Python Feature Request: Explicit variable declarations
nikolas pontikos
n.pontikos at laconic.com
Sat Apr 14 14:20:10 EDT 2007
Army1987 wrote:
> "jamadagni" <samjnaa at gmail.com> ha scritto nel messaggio
> news:1176557734.456820.275780 at p77g2000hsh.googlegroups.com...
>>> Languages like Perl and VB need a strict mode because they will
>>> auto-vivify variable for you. I.e. they will bring variables to life
>>> with defined or undefined values if you use them in a l-value (left hand
>>> side of an assignment) without having declared them prior. If you do
>>> that in Python you get an exception.
>> I don't comprehend. I can just type a = 5 in a new Python session and
>> I get no exception. Python currently does not require variables to be
>> declared before they are used on the LHS.
>
> I think (s)he meant right hand.
>
>
Yes I did sorry about that. If an assignment had hands then I would
have been right ;).
More information about the Python-list
mailing list