From db2edea587f5489256b36dc67ee3202d673ad4e1 Mon Sep 17 00:00:00 2001 From: Keewis Date: Mon, 30 Aug 2021 11:02:37 +0200 Subject: rewrite the quantity format docs --- docs/formatting.rst | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'docs') 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 --------------------- -- cgit v1.2.1