]> 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)
committerFederico Caselli <cfederico87@gmail.com>
Wed, 15 Oct 2025 19:38:15 +0000 (21:38 +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.

(cherry picked from commit d0651bde134c0038596893766a31498b6a6c3d8b)

doc/build/orm/collection_api.rst

index be8e4ea95168f7de5290039cc53ea3019e0d0ea2..1777964cbbec4e139a5d16be76989d3b0123b3a4 100644 (file)
@@ -197,7 +197,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