You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make structseq more like collections.namedtuple #46561
bpo-1820: Enhance Object/structseq.c to match namedtuple and tuple api
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2009-02-11.04:39:11.914>created_at=<Date2008-03-16.21:19:30.784>labels= ['interpreter-core', 'type-bug', 'library']
title='Make structseq more like collections.namedtuple'updated_at=<Date2009-02-11.04:39:11.892>user='https://github.com/gvanrossum'
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).
Activity
gvanrossum commentedon Mar 16, 2008
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).
devdanzin commentedon Feb 11, 2009
Closing as a duplicate of bpo-1820.