[Python-3000] Type Comparisons with Godel Numbers
Jim Jewett
jimjjewett at gmail.com
Fri Apr 21 19:12:55 CEST 2006
On 4/20/06, Birch, Bill <birchb at anz.com> wrote:
> Type comparison operators would only need a deep
> inspection of the types when the godel strings don't match.
> If most comparisons will be an exact match (not a subtype)
> the lookup should be faster.
If you're assuming that, then just checking whether
obj.__class__ is requirement.allowed_class
should be pretty hard to beat...
-jJ
More information about the Python-3000
mailing list