Nick Coghlan wrote:
Personally, I would just add "in current scope" to the existing error
message for the unbound local case (and potentially collapse the
exception hierarchy a bit by setting UnboundLocalError = NameError).
-0
That was the case prior to Python 2.0. Reverting is potentially a
semantic change that will break any code that distinguishes between
(global) NameError and (local) UnboundLocalError. But personally, I
don't know why it was thought necessary to distinguish between them in
the first place.
--
Steven
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com