From 84eaad31882f33f6e3821c1029f341076c03ce4b Mon Sep 17 00:00:00 2001 From: Ken Kundert Date: Tue, 13 Jul 2021 01:34:56 -0700 Subject: [PATCH] doc: small refinements --- doc/basic_use.rst | 4 ++-- nestedtext.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/basic_use.rst b/doc/basic_use.rst index b293b5a..55f32f2 100644 --- a/doc/basic_use.rst +++ b/doc/basic_use.rst @@ -32,7 +32,7 @@ a :exc:`NestedTextError` exception is raised. ... """ >>> try: - ... data = nt.loads(content, 'dict') + ... data = nt.loads(content, top='dict') ... except nt.NestedTextError as e: ... e.terminate() @@ -47,7 +47,7 @@ function. >>> from inform import fatal, os_error >>> try: - ... groceries = nt.load('examples/groceries.nt', 'dict') + ... groceries = nt.load('examples/groceries.nt', top='dict') ... except nt.NestedTextError as e: ... e.terminate() ... except OSError as e: diff --git a/nestedtext.py b/nestedtext.py index 212c512..6233b2f 100644 --- a/nestedtext.py +++ b/nestedtext.py @@ -994,7 +994,7 @@ def loads(content, top='dict', *, source=None, on_dup=None, keymap=None): Examples: - *NestedText* is specified to *loads* in the form of a string: + A *NestedText* document is specified to *loads* in the form of a string: .. code-block:: python @@ -1521,8 +1521,8 @@ def dumps( 42: unsupported type. Alternatively, you can specify a function to *default*, which is used - to convert values to strings. It is used if no other converter is - available. Typical values are *str* and *repr*. + to convert values to recognized types. It is used if no suitable + converter is available. Typical values are *str* and *repr*. .. code-block:: python