What a curious assignment.

bruno at modulix onurb at xiludom.gro
Wed Nov 23 04:26:12 EST 2005


Neil.Jin at gmail.com wrote:
> [test 1]
> 
>>>>class A:
> 
> ...    i = 1
> ...
> 
>>>>a = A()
>>>>A.i
> 
> 1
> 
>>>>a.i
> 
> 1
> 
>>>>A.i = 2
>>>>A.i
> 
> 2
> 
>>>>a.i
> 
> 2
> 
> 
> [test2]
> 
>>>>class A:
> 
> ...    i = 1
> ...
> 
>>>>a = A()
>>>>A.i
> 
> 1
> 
>>>>a.i
> 
> 1
> 
>>>>a.i = 2
>>>>A.i
> 
> 1
> 
>>>>a.i
> 
> 2
> 
> 
> Is there somthing wrong????

No.

-- 
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"



More information about the Python-list mailing list