diff options
| author | Keewis <keewis@posteo.de> | 2021-08-30 11:02:37 +0200 |
|---|---|---|
| committer | Keewis <keewis@posteo.de> | 2021-08-30 11:02:37 +0200 |
| commit | db2edea587f5489256b36dc67ee3202d673ad4e1 (patch) | |
| tree | fa0ffa96783492d7d215115e7c0ab0e420e23a2b /docs | |
| parent | 3eb1bd89b4b6b76818adec7f0fd99ef6b4219e14 (diff) | |
| download | pint-db2edea587f5489256b36dc67ee3202d673ad4e1.tar.gz | |
rewrite the quantity format docs
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/formatting.rst | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/docs/formatting.rst b/docs/formatting.rst index 9a479ba..8126592 100644 --- a/docs/formatting.rst +++ b/docs/formatting.rst @@ -76,10 +76,8 @@ Spec Name Example Quantity Format Specifications ------------------------------ -In addition to the structure of :py:class:`Unit` format specifications, -:py:class:`Quantity` format specifications also may contain a format spec for the -magnitude. For example, ``".8f~P"`` formats the magnitude in floating point notation -with 8 digits and the unit in the short pretty format. +The magnitude format is forwarded to the magnitude (for a unit-spec of ``H`` the +magnitude's ``_repr_html_`` is called). Let's look at some more examples: @@ -94,7 +92,7 @@ Let's look at some more examples: # additional magnitude format f"{q:.2f~#P}" # short compact pretty with 8 float digits - f"{q:#~}" # compact short default + f"{q:#~}" # short compact default Quantity Format Types --------------------- |
