[Python-3000] Builtin iterator type

Bill Janssen janssen at parc.com
Sat Nov 18 04:51:05 CET 2006


Greg Ewing writes:
> > Checking for some textual attributes of a
> > type
> 
> Now you're talking about LYBL, which is generally
> considered an anti-pattern in Python. APIs should
> be designed so that you don't need to test for the
> presence of features.

So you join me in wanting to make the use of "hasattr()" unnecessary?

Good.

But when you do have to test, it would be nice to be able to
test for a semantic item rather than a syntactic one.

Bill


More information about the Python-3000 mailing list