[Python-ideas] possible attribute-oriented class
george.sakkis at gmail.com
Fri Sep 4 23:04:55 CEST 2009
On Fri, Sep 4, 2009 at 4:37 PM, Jan Kaliszewski<zuo at chopin.edu.pl> wrote:
> 04-09-2009 Ken Newton <krnewton at gmail.com> wrote:
>> I like this version very much. I'm ready to put this into practice to see
>> how it works in practice.
> Not only you (Ken) and me. :-) It appears that the idea is quite old. Nick
> Coghlan replied at python-ideas at python.org:
>> Jan Kaliszewski wrote:
>>> What do you think about it?
>> It reminds me a bit of the old (short-lived) namespaces module:
>> Steven's draft PEP on the topic is still available in the python-list
>> The problem we found with it was that the basic solutions (empty class
>> and now named_tuple) were good enough that it wasn't worth the hassle
>> involved in grabbing an extra library for it.
> Named tuples (which indeed are really very nice) are read-only, but the
> approach they represent could (and IMHO should) be extended to some kind
> of mutable objects.
Maybe something like http://code.activestate.com/recipes/576555/ ?
More information about the Python-ideas