Can global variable be passed into Python function?
Marko Rauhamaa
marko at pacujo.net
Fri Feb 28 06:38:11 EST 2014
More information about the Python-list mailing list
Fri Feb 28 06:38:11 EST 2014
- Previous message (by thread): Can global variable be passed into Python function?
- Next message (by thread): Can global variable be passed into Python function?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Chris Angelico <rosuav at gmail.com>: > Python currently has dispatch tables and if/elif chains, and a strong > cultural aversion to switch. You could change that by coming up with > some *really* awesome proposal, but you'll be fighting against the > tide a bit. It's easy have a "cultural aversion" when the language doesn't provide the facility. Switch statements provide for excellent readability in parsers and state machines, for example. They also allow the Python compiler to optimize the statement internally unlike long if-else chains. Marko
- Previous message (by thread): Can global variable be passed into Python function?
- Next message (by thread): Can global variable be passed into Python function?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list