Re: Class in a Class

2010-06-02 Thread JF Simon
OK, Events is not in the 'global' scope ! Thanks (i'm tired) On 3 juin, 07:18, Daemoneye wrote: > 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 дµÀ: > > > > > Hello, > > > I'm lost i

Re: Class in a Class

2010-06-02 Thread Daemoneye
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 写道: Hello, I'm lost in Python !! If I write this class Dated(Behavior): created_on = models.DateTimeField(_('Created on')) updated_on

Class in a Class

2010-06-02 Thread JF Simon
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 :