structseq and keywords?

Nick Mathewson QnickQm at alum.mit.edu
Thu Mar 14 17:44:33 EST 2002


In article <slrna8vitm.sl2.quinn at barf.ugcs.caltech.edu>, Quinn Dunkan wrote:
> On Wed, 13 Mar 2002 15:22:18 GMT, Nick Mathewson <QnickQm at alum.mit.edu> 
>     wrote:
>>I agree with this.  One of the explicit design decisions was that
>>since it's so easy to create a lookalike class in Python, there's not
>>a lot of reason to expose structseq as a metatype.
> 
> Ok, I guess what I really wanted was a DEFSTRUCT-like facility.  I'll use
> Michael's python StructSeq for that.  I was originally going to do things 
> that way, but some demon whispered and I decided not to, for whatever 
> reason.

Errr... quick question.  If all you want is DEFSTRUCT, are you sure you
need even a Python StructSeq?  

In other words, the point of my message was that, unless you're trying
to support legacy code, it's probably adequate just make something that
supports:

         x.a, x.b, x.c

but not have to deal with the cruft structseq does to make sure that 
legacy code can still say:

         x[0], x[1], x[2]

But-it's-your-program-not-mine-ly yrs,
-- 
 Nick Mathewson    <Q nick Q m at alum dot mit dot edu>
                      Remove Q's to respond.  No spam.



More information about the Python-list mailing list