Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 119ebb7 commit b5d164cCopy full SHA for b5d164c
1 file changed
Doc/library/collections.rst
@@ -792,6 +792,11 @@ they add the ability to access fields by name instead of position index.
792
Named tuple instances do not have per-instance dictionaries, so they are
793
lightweight and require no more memory than regular tuples.
794
795
+ For simple uses, where the only requirement is to be able to refer to a set
796
+ of values by name using attribute-style access, the
797
+ :class:`types.SimpleNamespace` type can be a suitable alternative to using
798
+ a namedtuple.
799
+
800
.. versionchanged:: 3.1
801
Added support for *rename*.
802
0 commit comments