[Python-ideas] Proposal to add new built-in struct (was: Add kwargs to built-in function object)

Greg Ewing greg.ewing at canterbury.ac.nz
Fri May 23 01:03:00 CEST 2008


Brandon Mintern wrote:
> This is a proposal to add a new built-in named struct:
> 
> struct(**kwargs)
>     Return a struct object which has the attributes given in kwargs.

I think I'd prefer 'record', to avoid any potential
confusion with the struct module, which does something
quite different.

Also, my Pascal background makes the term 'record'
seem more high-level and therefore Pythonic to me.

-- 
Greg



More information about the Python-ideas mailing list