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 gvanrossum
Recipients Arfrever, Jim.Jewett, asvetlov, gregory.p.smith, gvanrossum, ncoghlan, pitrou, r.david.murray, skrah, vstinner
Date 2012-04-01.04:00:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1333252802.42.0.271694929012.issue14417@psf.upfronthosting.co.za>
In-reply-to
Content
But the sleep(0.1) forces a thread switch so I consider that still cheating -- nobody in their right mind would consider calling sleep() inside __hash__.

You can probably get it to fail without this by just doing a bunch of random computation in the __hash__ (and using a low sys.setswitchinterval() value).  Or consider creating a key that consists of e.g. a tuple of 100 or 1000 Key instances -- hashing that will call the __hash__ on each of those, wasting a lot of cycles.
History
Date User Action Args
2012-04-01 04:00:02gvanrossumsetrecipients: + gvanrossum, gregory.p.smith, ncoghlan, pitrou, vstinner, Arfrever, r.david.murray, asvetlov, skrah, Jim.Jewett
2012-04-01 04:00:02gvanrossumsetmessageid: <1333252802.42.0.271694929012.issue14417@psf.upfronthosting.co.za>
2012-04-01 04:00:01gvanrossumlinkissue14417 messages
2012-04-01 04:00:01gvanrossumcreate