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
Recipients
Date 2004-09-21.19:29:15
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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.
History
Date User Action Args
2007-08-23 14:26:23adminlinkissue1031667 messages
2007-08-23 14:26:23admincreate