]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Update collection_api.rst (#12912)
authorkrave1986 <krave@qq.com>
Wed, 15 Oct 2025 19:37:10 +0000 (03:37 +0800)
committerGitHub <noreply@github.com>
Wed, 15 Oct 2025 19:37:10 +0000 (21:37 +0200)
In the Dictionary Collections section, the example code incorrectly calls .items() on the dictionary but shows dictionary output instead of the items() method's actual return value.

doc/build/orm/collection_api.rst

index 442e88c981059e9a9b617fb152664b84a2d7d17d..d1fbe8c00b0546d793351d8eaa64df8d7005b94a 100644 (file)
@@ -180,7 +180,7 @@ may be appropriately parametrized::
 
     >>> item = Item()
     >>> item.notes["a"] = Note("a", "atext")
-    >>> item.notes.items()
+    >>> item.notes
     {'a': <__main__.Note object at 0x2eaaf0>}
 
 :func:`.attribute_keyed_dict` will ensure that