[Python-ideas] No implicit variable declarations

Chris Angelico rosuav at gmail.com
Sat Apr 12 20:07:53 CEST 2014


On Sun, Apr 13, 2014 at 3:47 AM, Markus Unterwaditzer
<markus at unterwaditzer.net> wrote:
> OTOH I like your idea of suggesting variable names when NameError
> is raised, but i don't know how easy this is to implement in CPython.

There's another proposal in the pipeline, regarding the addition of
extra info to various exceptions, and one of the points it makes is
that suggestions could be made on NameError (which would probably be a
feature wanted more in interactive mode than elsewhere). How easily it
can be made truly useful is anyone's guess; I generally find that "Did
you mean" lists are more often useless than helpful.

ChrisA


More information about the Python-ideas mailing list