[Python-Dev] What's a PyStructSequence ?

M.-A. Lemburg mal@lemburg.com
Thu, 29 Nov 2001 12:56:53 +0100


"Martin v. Loewis" wrote:
> 
> > Indeed -- and I have a question there: why did you have to implement
> > this as meta-type ?
> 
> MAL, please do read the patch discussion first, at
> 
> http://sourceforge.net/tracker/?group_id=5470&atid=305470&func=detail&aid=462296

The discussion on SF doesn't really answer my question. What
Nick did is fascinating: he reused the type object implementation
to mimic a sequence ! That's cool, but looks like an awfully 
tricky way of doing something straight forward such as sub-classing
the tuple type to extend it with an additional dictionary.
So the question remains: why did Nick *have* to implement this
as meta-type ?

BTW, Nick's stuff is a nice intro to the more complicated capabilities 
of the new type system and I think people can learn a lot from it. 
I certainly want to learn from it, because I haven't really interned 
the details behind all the new C type slots yet.

-- 
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
______________________________________________________________________
Consulting & Company:                           http://www.egenix.com/
Python Software:                        http://www.lemburg.com/python/