[Python-Dev] Switch statement (original) (raw)
Josiah Carlson jcarlson at uci.edu
Fri Jun 23 19:47:16 CEST 2006
- Previous message: [Python-Dev] Switch statement
- Next message: [Python-Dev] Switch statement
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"Alex Martelli" <aleaxit at gmail.com> wrote:
On 6/22/06, Guido van Rossum <guido at python.org> wrote: > Independent from this, I wonder if we also need static names of the form > > static = > > which would be similar to > > = static () > > but also prevents from being assigned to elsewhere in the same scope.
Lovely!!! Definitely +1. Could perhaps THIS use of static be allowed even outside of a def? I'd just love to have such static names in modules and classes, too (with runtime checks of errant assignments, if needed).
The problem is that there would need to be a change to modules to be more class-like (read-only properties), as "module.foo = x" would need to raise an exception if foo was static in module.
- Josiah
- Previous message: [Python-Dev] Switch statement
- Next message: [Python-Dev] Switch statement
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]