Beginner's scoping question
Premshree Pillai
premshree_python at yahoo.co.in
Thu Nov 11 14:16:46 EST 2004
--- Alan Little <contact at alanlittle.org> wrote:
> a=1
> b=[]
> class C():
> def __init__(self):
> a=2
> b.append(3)
>
> c = C()
>
> print b
> # [3]
>
> # but ...
> print a
> # 1
>
> ???
> --
> http://mail.python.org/mailman/listinfo/python-list
>
You probably already got your answer. Just wanted to
point out that --
class C():
-- is incorrect. Should be
class C:
:-)
--Premshree
=====
-Premshree
[http://www.qiksearch.com/]
________________________________________________________________________
Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony
More information about the Python-list
mailing list