Ian Bicking: the old part of his blog

Re: My Python 4k

<pre>
interface IFoo(Bar):
    a = 1
</pre>

Consider this declaration means:

<pre>
def tmp():
    a = 1
IFoo = interface('IFoo', (Bar,), tmp)
</pre>

With this we can express user defined function definition. Interface or class declaration can be emulated by executing tmp and using its local scope as definitions list.
Comment on My Python 4k
by irg