From a4b9c86db548b2d0dbb5af7a6bbdc26ab47e1eec Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Thu, 12 Apr 2018 02:02:56 +0100 Subject: [PATCH] postfix force non-dict documentation --- README.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.rst b/README.rst index 00e9cd81..e9c1df75 100644 --- a/README.rst +++ b/README.rst @@ -511,6 +511,14 @@ with the ``desc`` and ``postfix`` arguments: t.postfix[1]["value"] = i / 2 t.update() +Points to remember when using ``{postfix[...]}`` in the ``bar_format`` string: + +- ``postfix`` also needs to be passed as an initial argument in a compatible + format, and +- ``postfix`` will be auto-converted to a string if it is a ``dict``-like + object. To prevent this behaviour, insert an extra item into the dictionary + where the key is not a string. + Nested progress bars ~~~~~~~~~~~~~~~~~~~~