<div dir="auto"><div><div class="gmail_quote"><div dir="ltr">On Fri, Jan 18, 2019, 5:55 AM Antoine Pitrou <<a href="mailto:solipsis@pitrou.net">solipsis@pitrou.net</a> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
> id() returning the address of the object should be a guaranteed feature <br>
<br>
For me, the definitive answer is "yes, it's a CPython feature".<br>That doesn't mean the CPython feature has to live forever. We may want to deprecate it at some point</blockquote></div></div><div dir="auto"><br></div><div dir="auto">Whenever I've taught Python (quite a bit between writing, in person, and webinars), I have been very explicit in stating that id(obj) returns some unique number for each object, and mentioned that for MANY Python objects CPython users an implementation convenience of using the memory address.</div><div dir="auto"><br></div><div dir="auto">Every time I've explained it I've said not to rely on that implementation detail. It's not true for small integers, for example, even in CPython.</div><div dir="auto"></div></div>