From Pep #282.