Brian Quinlan <[EMAIL PROTECTED]> writes: > > Python already has a "global" declaration; > > Which is evaluated at runtime, does not require that the actual global > variable be pre-existing, and does not create the global variable if > not actually assigned. I think that is pretty different than your > proposal semantics.
Different how? > Your making this feature "optional" contradicts the subject of this > thread i.e. declarations being necessary. They're necessary if you enable the option. > But, continuing with your declaration thought experiment, how are > you planning on actually adding optional useful type declarations to > Python e.g. could you please rewrite this (trivial) snippet using > your proposed syntax/semantics? def do_add(x->str, y->str): return '%s://%s' % (x, y) def do_something(node->Node): if node.namespace == XML_NAMESPACE: return do_add('http://', node.namespace) elif node.namespace == ... -- http://mail.python.org/mailman/listinfo/python-list