greg wrote:
kj wrote:
Wow. As rationales for syntax constructs go, this has got to be
the most subtle one I've ever seen...
It's to avoid masking bugs. Suppose you accidentally
wrote
try:
v = mumble.field
sys.warming('field was actually there?')
except AttributeError:
pass
Then you could easily fail to notice that
you had written 'warming' instead of 'warning'.
Well, if you look, you'll discover that warning is not in the
sys module at all, but in the logging module.
So the original example already demonstrated the problem.
--Scott David Daniels
scott.dani...@acm.org
--
http://mail.python.org/mailman/listinfo/python-list