Python Feature Request: Explicit variable declarations

"Martin v. Löwis" martin at v.loewis.de
Sat Apr 14 06:56:40 EDT 2007


samjnaa at gmail.com schrieb:
> Hello. Please tell me whether this feature request is sane (and not
> done before) for python so it can be posted to the python-dev mailing
> list. I should say first that I am not a professional programmer with
> too much technical knowledge.

I believe it has been requested before, but I'm too lazy now to search
for prior discussion. The request is sane, but is also incomplete: there
is no syntax suggested for the actual declarations of local variables,
and no discussion whether this is meant to apply to local variables
only, or also to global variables and object attributes.

I think there is a fairly low chance that such a request will be
considered. It's a big change (implementation-wise, and
documentation-wise), and likely controversial. So one would have
to write a PEP first (see PEP 1 for details).

Regards,
Martin



More information about the Python-list mailing list