[Doc-SIG] Does the "is" operator only matter for mutable object?
Elva Castaneda de Hall
elva at valuestech.com
Sat Mar 5 20:16:08 CET 2011
Hello!
I am not sure how I ended up with a subscription to this virtual
conversation. I am not even sure where to go to unsubscribe.
Rest assured I have no clue what is being discussed here. ; > )
Can someone tell me the website URL I can go to unsubscribe?
Thanks, e
On Mar 5, 2011, at 11:12 AM, Laura Creighton wrote:
> In a message of Sat, 05 Mar 2011 09:06:22 PST, Aahz writes:
>> +1 -- here's my rewrite for a bit more clarity:
>>
>> The operators ``is`` and ``is not`` compare whether two objects are
>> really the same object (have the same memory location). Immutable
>> objects with the same value and type may be cached to the same
>> object for
>> efficiency. For example, ``'spam' is 'spam'`` is either ``True`` or
>> ``False`` depending on Python implementation. Singleton objects
>> (``True``, ``False``, ``None``) are always the same object.
>
> I like Aahz's version.
> Laura
>
> _______________________________________________
> Doc-SIG maillist - Doc-SIG at python.org
> http://mail.python.org/mailman/listinfo/doc-sig
More information about the Doc-SIG
mailing list