[Python-Dev] dir() in docs and tests considered irritating

Raymond Hettinger python@rcn.com
Wed, 29 May 2002 13:44:01 -0400


From: "Peter Funk" <pf@artcom-gmbh.de>
> nnorwitz just fixed a >>> dir(__builtin__) screen shot
> in the Python tutorial to add 'PendingDeprecationWarning' there.

I built a patch to fill the tp_iter slot for lists.  Right away, the
regression test test_descrtut.py failed because __iter__ showed
up on the dir(list) example.

I think everytime we use a dir() example in the docs or in
the testsuite, we're creating unnecessary dependencies.

It's not a big deal, but if the example or test can make its
point without the dir(), it would lower the PITA factor.


Raymond Hettinger