[Python-ideas] User-defined literals

random832 at fastmail.us random832 at fastmail.us
Thu Jun 4 23:34:53 CEST 2015


On Thu, Jun 4, 2015, at 17:23, Chris Angelico wrote:
> Huh. Does that imply that Brython has to construct a brand-new integer
> object for absolutely every operation and constant, in case someone
> monkeypatched something? Once integers (and other built-in types) lose
> their immutability, they become distinguishable:
> 
> x = 2
> monkey_patch(x)
> y = 2

Er, we're talking about monkey-patching the int *class* (well, the
complex class, but the same idea applies), not an individual int object.


More information about the Python-ideas mailing list