2.2 features

Just van Rossum just at letterror.com
Wed Aug 1 03:35:04 EDT 2001


Guido van Rossum wrote:
> 
> > I'm starting to like the is{subclass,instance}() version. It's probably
> > quicker for one to understand code written by others, and for
> > non-fulltime-python-programmers to remember what "in" means in each
> > context.
> 
> You may be right.  isinstance() and issubclass() are somewhat standard
> in other languages I believe, and hard to misunderstand.  The form
> 
>   if x in list: ...
> 
> looks a lot more confusing.  I may withdraw this idea.

Also: what would "for x in type" mean? I presume nothing, but I can't think
off-hand of another case where "if x in y" is meaningful and "for x in y"
isn't. But I see it's been withdrawn in the meantime anyway...

Just



More information about the Python-list mailing list