From 97e368312e10c39d2a04ebaacee569a2231986b0 Mon Sep 17 00:00:00 2001 From: Laurens Valk Date: Wed, 14 Jul 2021 15:32:28 +0200 Subject: [PATCH] micropython.qstr_info: Clean up docstring. Say the same with less words. Also add one line from elsewhere in the MicroPython docs to explain what this is about. --- src/micropython/__init__.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/micropython/__init__.py b/src/micropython/__init__.py index 125d812..84994b0 100644 --- a/src/micropython/__init__.py +++ b/src/micropython/__init__.py @@ -91,12 +91,13 @@ def qstr_info(verbose: Any) -> None: def qstr_info(*args): """ - Print information about currently interned strings. If the ``verbose`` - argument is given then extra information is printed. + Prints how many strings are interned and how much RAM they use. - The information that is printed is implementation dependent, but currently - includes the number of interned strings and the amount of RAM they use. In - verbose mode it prints out the names of all RAM-interned strings. + MicroPython uses string interning to save both RAM and ROM. + This avoids having to store duplicate copies of the same string. + + If the ``verbose`` argument is given it also prints out the names of all + RAM-interned strings. """