Type subclassing: bug or feature

Emile van Sebille emile at fenx.com
Thu Jun 13 22:56:28 EDT 2002


Bengt Richter
> BTW, I just thought of a 'where' keyword for 'for' e.g., the above for
would become
>
>     for name,m in str.__dict__.items() where type(m) ==
type(str.find):
>
> sort of like sql select ... where ... or the list comprehension if.
>

why not use if, as in

[ name,m for name,m in str.__dict__.items() if type(m) ==
type(str.find) ]



--

Emile van Sebille
emile at fenx.com

---------




More information about the Python-list mailing list