[Python-Dev] from tuples to immutable dicts
Martin v. Loewis
24 Nov 2002 09:15:58 +0100
Brett Cannon <bac@OCF.Berkeley.EDU> writes:
> > Fred once had a plan to expose structseqs to Python, to allow the
> > creation of new structs in Python. I was suggesting that there should
> > be a method new.struct_seq, which is called as
> > struct_seq(name, doc, n_in_sequence, (fields))
> > where fields is a list of (name,doc) tuples. The resulting thing would
> > be similar to os.stat_result: you need to call it with the mandatory
> You meant "can", right, Martin?
Probably an English-language issue: If you call it, the mandatory
fields must be present as positional arguments (i.e. you can't call it
and omit mandatory fields, or pass them as keyword arguments).
> I think the idea is good if you can get it to tie directly into C code.
> That would get a +1 from me. If not, then +0.
What means to "tie into C code" here?