Boolean Values
D-Man
dsh8290 at rit.edu
Thu Apr 5 18:17:42 EDT 2001
On Thu, Apr 05, 2001 at 06:30:45PM +0000, Fredrik Lundh wrote:
| D-Man wrote:
| > | import __builtin__
|
| if you follow his instructions, it'll work.
I missed that import the first time. I also thought it was a typo
that the 's' was missing. So what is the difference between
__builtin__ and __builtins__? Why does CPython make __builtins__
visible by default and Jython doesn't? Since messing with
__builtins__ like this isn't really a good idea, it seems that
Jython is better for not makeing __builtins__ so readily accessible.
The code would still be needed in every module that might be executed
as a stand-alone (such as for tests) which totally defeats the purpose
of tinkering with __builtin__.
My question still stands, though. Why are 'true' and 'false'
keyword/builtin objects considered not necessary?
-D
More information about the Python-list
mailing list