[Python-Dev] new draft of PEP 227
Paul Prescod
paulp@ActiveState.com
Wed, 13 Dec 2000 23:00:21 -0800
Jeremy Hylton wrote:
>
> I've got a new draft of PEP 227. The terminology and wording are more
> convoluted than they need to be. I'll do at least one revision just
> to say things more clearly, but I'd appreciate comments on the
> proposed spec if you can read the current draft.
It set me to thinking:
Python should never require declarations. But would it necessarily be a
problem for Python to have a variable declaration syntax? Might not the
existence of declarations simplify some aspects of the proposal and of
backwards compatibility?
Along the same lines, might a new rule make Python code more robust? We
could say that a local can only shadow a global if the local is formally
declared. It's pretty rare that there is a good reason to shadow a
global and Python makes it too easy to do accidentally.
Paul Prescod