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.

Author christian.heimes
Recipients christian.heimes, rhettinger
Date 2008-01-14.04:20:25
SpamBayes Score 0.007686789
Marked as misclassified No
Message-id <1200284428.58.0.762384814897.issue1820@psf.upfronthosting.co.za>
In-reply-to
Content
Raymond Hettinger wrote:

Here's a couple more if you want to proceed down that path:

1. Have structseq subclass from PyTupleObject so that isinstance(s,
tuple) returns True.  This makes the object usable whenever 
tuples are needed.

2. Add _fields, _asdict, and _replace to match the API in
collections.namedtuple().  The _fields tuple should only include the 
visible positional fields while _asdict() and _replace() should include
all of the fields whether visible or accessible only by 
attribute access.

3. Change the constructor to accept keyword args so that eval(repr(s))
== s works.

NOTE:
I've marked the task as easy but it's not a task for a total newbie.
It's a feasible yet challenging task for somebody who likes to get into
CPython core programming. Basic C knowledge is required!
History
Date User Action Args
2008-01-14 04:20:28christian.heimessetspambayes_score: 0.00768679 -> 0.007686789
recipients: + christian.heimes, rhettinger
2008-01-14 04:20:28christian.heimessetspambayes_score: 0.00768679 -> 0.00768679
messageid: <1200284428.58.0.762384814897.issue1820@psf.upfronthosting.co.za>
2008-01-14 04:20:27christian.heimeslinkissue1820 messages
2008-01-14 04:20:25christian.heimescreate