use of __new__ to permit "dynamic" completion within (any?) IDE ?

gst g.starck at gmail.com
Wed Dec 8 10:23:45 EST 2010


On 8 déc, 16:20, gst <g.sta... at gmail.com> wrote:
> On 8 déc, 15:51, Jean-Michel Pichavant <jeanmic... at sequans.com> wrote:
>
> Hi,
>
> > gst wrote:
> > > nb: so this "hack" is only relevant during dev ; once the project
> > > would be finished the "hack" could be removed (i.e : in class2 init I
> > > would directly do : self.object1 = object1)
>
> > Expect some bugs then on the 'release' version.
>
> even with the "assert(self is _self)" in the "if _self:" condition in
> the new and/or  init methods of the class1 ?

note: I don't know if that matters but I'm using __slots__ in this
class1 ..

greg.




More information about the Python-list mailing list