Message22506
Logged In: YES
user_id=31435
That's OK. The language reference manual has always been
careful to say that an expression returning an immutable
object may or may not return a pre-existing object.
"for immutable types, operations that compute new values
may actually return a reference to any existing object with
the same type and value, while for mutable objects this is not
allowed"
So, e.g., had your function been
def f(): return ()
it was already true, under CPython, that f() is f(). No
correct Python program could rely on that, though; neither
on that only the empty tuple has been shared until now. |
|
Date |
User |
Action |
Args |
2007-08-23 14:26:23 | admin | link | issue1031667 messages |
2007-08-23 14:26:23 | admin | create | |
|