[Python-ideas] "on" statement

Oleg Broytman phd at phd.pp.ru
Thu Apr 1 21:04:54 CEST 2010


On Thu, Apr 01, 2010 at 11:54:53AM -0700, Bruce Leban wrote:
>     foo is in bar     = hasattr(foo,bar)

   foo is in bar

is currently a valid and widely used expression. It means
bar.__contains__(foo).

Oleg.
-- 
     Oleg Broytman            http://phd.pp.ru/            phd at phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.



More information about the Python-ideas mailing list