This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author tim.peters
Date 2004-09-21.19:29:15
SpamBayes Score
Marked as misclassified
Logged In: YES 

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 

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:23adminlinkissue1031667 messages
2007-08-23 14:26:23admincreate