Skip to content

Commit

Permalink
Update tutorial.rst
Browse files Browse the repository at this point in the history
See whether I've turned off doctest where old behavior is no longer easily reproducible.

Signed-off-by: Michael Tiemann <[email protected]>
  • Loading branch information
MichaelTiemannOSC committed Oct 22, 2023
1 parent b4b4616 commit 45a3909
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/getting/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@ Some units are compound, such as [energy], which is stated in terms of
[mass] * [length]**2 / [time]**2. Earlier versions of Pint would sort unit names
alphabetically by default, leading to different orderings of units (old behavior):

.. doctest::

```ignore
>>> "{:P}".format(ureg.parse_units('pound * ft**2 * second**-2'))
'foot²·pound/second²'
>>> "{:P}".format(ureg.parse_units('kg * cm**2 * second**-2'))
'centimeter²·kilogram/second²'
```

Now by default it sorts by dimensions as proposed by ISO 80000, with [mass]
coming before [length], which also comes before [time]. The dimension order
Expand Down

0 comments on commit 45a3909

Please sign in to comment.