PyMyth: Global variables are evil... WRONG!
ricaraoz at gmail.com
Tue Nov 12 11:15:01 CET 2013
El 12/11/13 01:46, Rick Johnson escribió:
> No, Python modules can be poked, prodded, and violated by any pervert
> who can spell the word "import". Attribute values can be reassigned
> and state can be externally manipulated resulting in all types of
> undefined behaviors --
My code, my responsibility, my business.... not yours.
> that does not sound like an interface to me. So if python modules are
> importable everywhere, and mutable from everywhere, then python
> modules are merely addresses to a collection of global variables? And
> they're only interfaces "superficially"? So that leaves us with
> Python's current implementation of unofficial "global" variables
> implemented as "puesdo- interfaces" by module objects that are victims
> waiting to be violated. Interesting. IF IT WALKS LIKE A GLOBAL DUCK
Nice choice of words, "violated", "victims".... Really conductive to a
balanced unprejudiced thought process.
More information about the Python-list