[Python-Dev] What's a PyStructSequence ?

Martin v. Loewis martin@v.loewis.de
Tue, 27 Nov 2001 21:05:44 +0100


> Wouldn't it make sense to expose this object in Python,
> e.g. by contructing it from a dictionary of string mappings ?
> 
> (The type constructor is not made available in bltinmodule.c.)

No. AFAIR, this idea was explicitly rejected at the time the patch was
designed (see the comments on the stat patch for the exact history).

The rationale was that it is easy enough to create a class that
doubles as tuple in Python yourself (perhaps through inheritance from
tuple), so there would be no need to expose this type.

Regards,
Martin