correct way to check for True in __builtins__?

Ian Bicking ianb at colorstudy.com
Fri May 10 20:19:56 EDT 2002


On Fri, 2002-05-10 at 18:48, David LeBlanc wrote:
> try
> 	dir(True)
> except
> 	...

It would be a bit easier to do:

try:
    True
except NameError:
    ...

  Ian







More information about the Python-list mailing list