Re: Constructor of object

2007-03-15 Thread inline
Thanks. But can I change returned by xml.get_widget() object type from gtk.Window to HelloWindow? -- http://mail.python.org/mailman/listinfo/python-list

Re: Constructor of object

2007-03-14 Thread Thinker
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 inline wrote: > I know it, but i don't want call constructor of parent class - I > use PyGTK and want to load window from glade file and assign it to > object, parented gtk.Window: > #!/usr/bin/env python > import gtk import gtk.glade > class Hello

Re: Constructor of object

2007-03-14 Thread Bruno Desthuilliers
inline a écrit : > Hello! > I want to assign self to object of parent class in constructor, Isn't it the other way round ?-) > like > > def my_func(): > ... > return ParentClass() > > class MyClass (ParentClass): > def __init__(self): > self = my_func() First point : __init

Re: Constructor of object

2007-03-14 Thread inline
On Mar 14, 9:05 pm, Thinker <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > inline wrote: > > Hello! I want to assign self to object of parent class in > > constructor, like > > > def my_func(): ... return ParentClass() > > > class MyClass (ParentClass): def __init_

Re: Constructor of object

2007-03-14 Thread inline
On Mar 14, 9:05 pm, Thinker <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > inline wrote: > > Hello! I want to assign self to object of parent class in > > constructor, like > > > def my_func(): ... return ParentClass() > > > class MyClass (ParentClass): def __init_

Re: Constructor of object

2007-03-14 Thread Thinker
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 inline wrote: > Hello! I want to assign self to object of parent class in > constructor, like > > def my_func(): ... return ParentClass() > > class MyClass (ParentClass): def __init__(self): self = my_func() > > but it not work, because "object not ini

Re: Constructor of object

2007-03-14 Thread Sylvain Defresne
inline wrote: > Hello! > I want to assign self to object of parent class in constructor, like > > def my_func(): > ... > return ParentClass() > > class MyClass (ParentClass): > def __init__(self): > self = my_func() > > but it not work, because "object not initialized". What

Constructor of object

2007-03-14 Thread inline
Hello! I want to assign self to object of parent class in constructor, like def my_func(): ... return ParentClass() class MyClass (ParentClass): def __init__(self): self = my_func() but it not work, because "object not initialized". What i can do? -- http://mail.python.org/