This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Make structseq more like collections.namedtuple
Type: behavior Stage:
Components: Interpreter Core, Library (Lib) Versions: Python 3.0, Python 2.6
process
Status: closed Resolution: duplicate
Dependencies: Superseder: Enhance Object/structseq.c to match namedtuple and tuple api
View: 1820
Assigned To: Nosy List: ajaksu2, gvanrossum, rhettinger
Priority: high Keywords:

Created on 2008-03-16 21:19 by gvanrossum, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg63594 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2008-03-16 21:19
The built-in type structseq (used by e.g. os.stat() for the stat
structure and by the time module for a time tuple) resembles the new
namedtuple type added to the collections module in 2.6.

It would be nice if these had at least a common ABC if not a shared
implementation.

At the same time I think that in 3.0 we should remove the feature of
"hidden fields" which is used to have structs that behave like
fixed-size tuples even though they have a variable number of named
fields (the list of names varies per platform).  We should deprecate the
use of tuple-unpacking for these (except for the first 6 fields of a
timetuple, perhaps).
msg81626 - (view) Author: Daniel Diniz (ajaksu2) * (Python triager) Date: 2009-02-11 04:39
Closing as a duplicate of issue 1820.
History
Date User Action Args
2022-04-11 14:56:31adminsetgithub: 46561
2009-02-11 04:39:11ajaksu2setstatus: open -> closed
resolution: duplicate
superseder: Enhance Object/structseq.c to match namedtuple and tuple api
messages: + msg81626
nosy: + ajaksu2, rhettinger
2008-03-16 21:19:30gvanrossumcreate