--
http://mail.python.org/mailman/listinfo/python-list
在 2012年8月30日星期四UTC+8下午7时54分35秒,Dave Angel写道:
> On 08/30/2012 06:55 AM, 陈伟 wrote:
>
> > when i write code like this:
>
> >
>
> > class A(object):
>
> >
>
> > d = 'it is a doc.'
>
> >
>
> >
>
&
when i write code like this:
class A(object):
d = 'it is a doc.'
t = A()
print t.__class__.d
print t.d
the output is same.
so it means class object's attribute is also the instance's attribute. is it
right? i can not understand it.
--
http://mail.python.org/mailman/listinfo/py