On Thu, Apr 26, 2012 at 1:50 PM, Adam Skutt <ask...@gmail.com> wrote:
> On Apr 25, 8:01 pm, Steven D'Aprano <steve
> +comp.lang.pyt...@pearwood.info> wrote:
>> 2) The "is" operator always has the exact same semantics and cannot be
>> overridden. The id() function can be monkey-patched.
>
> I can't see how that's useful at all.  Identity is a fundamental
> property of an object; hence retrieval of it must be a language
> operation.
> ...
> The other solution is to do what Java and C# do: banish id() entirely
> and only provide 'is' (== in Java, Object.ReferenceEquals() in C#).

The 'is' operator is a language feature. The id() function is not.

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to