Add annotations to global statement

I think the annotations of parameters and return value of a function, a useful practice for the user of the function. As a function can modify or create global variables, and as it's important for the end user, I would appreciate to add annotations in the global statement. An annotation syntax similar to that of parameters could be employed : global var : expression global var1 : expression1, var2 : expression2,... cheers, Alex (geoscience modeler)

On Thu, Sep 6, 2012 at 8:30 AM, Alexandre Bosc <Athelopuce@gmx.fr> wrote:
I cannot think of a case where having this feature would be of real help making a well-designed Python program. On Thu, Sep 6, 2012 at 9:17 AM, Rob Cliffe <rob.cliffe@btinternet.com> wrote:
I believe the suggestion is that the expression becomes metadata associated with the name var. Are you familiar with function annotations, with which the parallel was drawn? http://www.python.org/dev/peps/pep-3107/ Mike

On Thu, Sep 6, 2012 at 8:30 AM, Alexandre Bosc <Athelopuce@gmx.fr> wrote:
I cannot think of a case where having this feature would be of real help making a well-designed Python program. On Thu, Sep 6, 2012 at 9:17 AM, Rob Cliffe <rob.cliffe@btinternet.com> wrote:
I believe the suggestion is that the expression becomes metadata associated with the name var. Are you familiar with function annotations, with which the parallel was drawn? http://www.python.org/dev/peps/pep-3107/ Mike
participants (3)
-
Alexandre Bosc
-
Mike Graham
-
Rob Cliffe