On Thu, Aug 11, 2011 at 6:17 AM, Michael Trausch <fd0...@gmail.com> wrote: > Somthing like an "option" keyword (which would only be a keyword until the > first executable statement, e.g., would have to be before even imports) > could enable things like "semicolon" or "explicit", or whatever really, and > only affect those who opt in. If no code is ever seen using the option, it > can even be removed. Wouldn't be a bad way to test changes that would impact > the syntax of the language, actually...
Python already has a syntax like this: from __future__ import statictyping Although I'm not sure how you'd go about implementing it plausibly. It'd be a fairly backward-incompatible change; what would happen to the modules you import? Either you would have to have a duplicate set (one that uses statictyping and one that doesn't), or you'd have to have statictyping somehow work on a per-module basis. As far as I know, most of the other future statements are per-module (with the possible exception of barry_as_FLUFL, which until today I was not aware of). Would static typing then apply only to module-level variables and function-local variables, with the values in lists/tuples/dicts/objects/etc/etc/etc still being dynamically typed? I think it'd be easier to fork Python and give it a new name. ChrisA -- http://mail.python.org/mailman/listinfo/python-list