class A:
class B:
pass
a=A()
B=A.B()
you should add A. to control the class B
在 Thu, 03 Jun 2010 12:50:06 +0800,JF Simon <[email protected]> 写道:
Hello,
I'm lost in Python !!
If I write this ....
class Dated(Behavior):
created_on = models.DateTimeField(_('Created on'))
updated_on = models.DateTimeField(_('Updated on'))
class Events:
def __init__(self):
super(Events, self).__init__()
.... I get an error : NameError: global name 'Events' is not defined
Is not Events a real class ??
I don't understand, please help !
Thanks,
JF
--
吾血之血啊
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.