[Python-Dev] Assignment to class of module? (Autoloading? (Making Queue.Queue easier to use)) (original) (raw)
Phillip J. Eby pje at telecommunity.com
Fri Oct 14 03:42:32 CEST 2005
- Previous message: [Python-Dev] Assignment to __class__ of module? (Autoloading? (Making Queue.Queue easier to use))
- Next message: [Python-Dev] Assignment to __class__ of module? (Autoloading? (Making Queue.Queue easier to use))
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
At 01:32 PM 10/14/2005 +1300, Greg Ewing wrote:
Phillip J. Eby wrote:
> Actually, it's desirable to be able to do it for anything. But certainly > for otherwise-immutable objects it can lead to aliasing issues. Even for immutables, it could be useful to be able to add behaviour that doesn't mutate anything.
I meant that just changing its class is a mutation, and since immutables can be shared or cached, that could lead to problems. So I do think it's a reasonable implementation limit to disallow changing the class of an immutable.
- Previous message: [Python-Dev] Assignment to __class__ of module? (Autoloading? (Making Queue.Queue easier to use))
- Next message: [Python-Dev] Assignment to __class__ of module? (Autoloading? (Making Queue.Queue easier to use))
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]