[EMAIL PROTECTED] wrote:

> This one works. But I suppose there must be a way to artificially
> create a new block of code, some thing like this,
> 
> class Test:
>    c = None
>    <<howToCreateANewNameSpace>>:
>        # Objects created here are local to this scope
>        a = 1
>        b = 2
>        global c
>        c = a + b

if you want a local scope, use a function:

     class Test:
         c = do_calculation(1, 2)

</F>

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to