[Python-Dev] Add a frozendict builtin type (original) (raw)
André Malo nd at perlig.de
Thu Mar 1 16:05:27 CET 2012
- Previous message: [Python-Dev] Add a frozendict builtin type
- Next message: [Python-Dev] Add a frozendict builtin type
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thursday 01 March 2012 15:54:01 Victor Stinner wrote:
> I'm not sure about your final types. I'm using slots = () for such > things
You can still replace an attribute value if a class defines slots: >>> class A: ... slots=('x',) ... x = 1 ... >>> A.x=2 >>> A.x 2
Ah, ok, I missed that. It should be fixable with a metaclass. Not very nicely, though.
nd
- Previous message: [Python-Dev] Add a frozendict builtin type
- Next message: [Python-Dev] Add a frozendict builtin type
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]