[Twisted-Python] Please fix your code to not use dir()

Itamar Shtull-Trauring itamar at itamarst.org
Mon May 26 19:52:58 EDT 2003

On Mon, 26 May 2003 17:29:06 -0600
Andrew Dalke <dalke at dalkescientific.com> wrote:

> Is there any reason this code doesn't use "for i, i_ in 
> module.__dict__.items()"?

Indeed, these are probably all bugs. Thanks for taking the time to point
this out.

I've seen bugs caused by this already, so please, everyone, use
twisted.python.reflect or python's inspect module, not dir().

Itamar Shtull-Trauring    http://itamarst.org/
http://www.zoteca.com -- Python & Twisted consulting

More information about the Twisted-Python mailing list