Can global variable be passed into Python function?

Steven D'Aprano steve+comp.lang.python at
Sat Mar 1 04:29:57 CET 2014

On Sat, 01 Mar 2014 13:03:53 +1100, Chris Angelico wrote:

> On Sat, Mar 1, 2014 at 12:59 PM, Steven D'Aprano
> <steve+comp.lang.python at> wrote:
>> However, the example as given won't quite work. You never instantiate
>> the Idle etc. classes, which means the methods won't work. You need to
>> make them class methods or static methods, or perform some metaclass
>> magic prevent them from being turned into instance methods when called.
> Actually, he does - setting a state means instantiating that state.

Ah, so he does.


More information about the Python-list mailing list