[Python-ideas] stealing "var" from javascript

Adam Olsen rhamph at gmail.com
Thu Apr 10 19:23:00 CEST 2008

On Thu, Apr 10, 2008 at 8:13 AM, Aaron Watters <aaron.watters at gmail.com> wrote:
> This would allow catching a lot of nameerrors at
>  compile time, and also name mistakes which don't
> show up as nameerrors (like accidentally typing a
> variable name wrong in such a way that it doesn't
> fail the test cases, but only fails after deployment...).
>  Any assignment with no associated "my" declaration
> would automatically be an error at compile time.

If they don't support it already, the various lint tools could
probably be extended to catch this.  Just find out how similar the
variable used in a function are, especially ones assigned only once
and never used.

Adam Olsen, aka Rhamphoryncus

More information about the Python-ideas mailing list