A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2005-October/057289.html below:

[Python-Dev] Assignment to __class__ of module? (Autoloading? (Making Queue.Queue easier to use))

[Python-Dev] Assignment to __class__ of module? (Autoloading? (Making Queue.Queue easier to use)) [Python-Dev] Assignment to __class__ of module? (Autoloading? (Making Queue.Queue easier to use))Phillip J. Eby pje at telecommunity.com
Fri Oct 14 03:42:32 CEST 2005
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.

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4