[Python-checkins] cpython: glossary entry for struct sequence

benjamin.peterson python-checkins at python.org
Thu Apr 21 01:27:20 CEST 2011


http://hg.python.org/cpython/rev/8951c60b9005
changeset:   69505:8951c60b9005
user:        Benjamin Peterson <benjamin at python.org>
date:        Wed Apr 20 18:27:32 2011 -0500
summary:
  glossary entry for struct sequence

files:
  Doc/glossary.rst |  8 ++++++++
  1 files changed, 8 insertions(+), 0 deletions(-)


diff --git a/Doc/glossary.rst b/Doc/glossary.rst
--- a/Doc/glossary.rst
+++ b/Doc/glossary.rst
@@ -580,6 +580,14 @@
       an :term:`expression` or a one of several constructs with a keyword, such
       as :keyword:`if`, :keyword:`while` or :keyword:`for`.
 
+   struct sequence
+      A tuple with named elements. Struct sequences expose an interface similiar
+      to :term:`named tuple` in that elements can either be accessed either by
+      index or as an attribute. However, they do not have any of the named tuple
+      methods like :meth:`~collections.somenamedtuple._make` or
+      :meth:`~collections.somenamedtuple._asdict`. Examples of struct sequences
+      include :data:`sys.float_info` and the return value of :func:`os.stat`.
+
    triple-quoted string
       A string which is bound by three instances of either a quotation mark
       (") or an apostrophe (').  While they don't provide any functionality

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list