Inserting class namespace into method scope

Emile van Sebille emile at fenx.com
Sun Nov 21 12:16:14 EST 2010


On 11/20/2010 4:59 PM Steven D'Aprano said...
> On Sun, 21 Nov 2010 08:59:30 +1100, Ben Finney wrote:
>
>> C'mon, Steven, you know the drill. If you want us to help you solve a
>> problem, don't start with “I want to use this behaviour that seems
>> loony, and I won't say why”. Instead, help us by telling us what problem
>> you're trying to solve.
>
> Well, I tried the TL;DR version. Now you have to read the full version.
>
> Inspired by the last maxim of the Zen:
>
> "Namespaces are one honking great idea -- let's do more of those!"

Hmm... while playing with various takes on globals and code blocks I 
came across this that may be of interest.

http://www.voidspace.org.uk/python/articles/code_blocks.shtml

Emile




More information about the Python-list mailing list