[Python-Dev] Are property descriptors intended to be immutable? (original) (raw)
Curt Hagenlocher curt at hagenlocher.org
Sat Feb 7 18:41:05 CET 2009
- Previous message: [Python-Dev] Are property descriptors intended to be immutable?
- Next message: [Python-Dev] Are property descriptors intended to be immutable?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, Feb 6, 2009 at 4:04 PM, Guido van Rossum <guido at python.org> wrote:
On Fri, Feb 6, 2009 at 2:44 PM, Curt Hagenlocher <curt at hagenlocher.org> wrote:
...because they're not quite :). Should I file this as a bug report? No, this is just how it works. I hope they aren't documented as immuable?
Not that I know of :). But the individual properties of the descriptor are all read-only and that the implementations of setter, getter and deleter return new objects instead of mutating and returning the old descriptor. So it seemed a little odd that there was just one way remaining in which the object could be mutated.
(I'm a recent convert to the joys of immutability. :)
-- Curt Hagenlocher curt at hagenlocher.org
- Previous message: [Python-Dev] Are property descriptors intended to be immutable?
- Next message: [Python-Dev] Are property descriptors intended to be immutable?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]