On Sat, 22 Apr 2006 03:12 am, Jim Jewett wrote:
> On 4/20/06, Birch, Bill <[EMAIL PROTECTED]> 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...
OK that will work for atomic types.

But if obj.__class__ is <type 'list'> it does not tell us what is _in_ the 
list. We want to know it's list[any] or list[int] ot list[str] etc. 
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to