[Python-Dev] Weird use of hash() -- will this work?

Andrew Kuchling akuchlin@mems-exchange.org
2001年1月18日 10:28:19 -0500


On Thu, Jan 18, 2001 at 02:23:21AM -0500, Eric S. Raymond wrote:
>And it's not hard to notice that an object hash is a memory address.

Unless the object defines __hash__()! If you want the memory address, 
use id() instead.
--amk

AltStyle によって変換されたページ (->オリジナル) /