On Nov 2, 12:31 pm, gert <[EMAIL PROTECTED]> wrote:
> On Nov 2, 12:27 pm, Boris Borcic <[EMAIL PROTECTED]> wrote:
>
>
>
> > gert wrote:
> > > class Test(object):
>
> > >     def execute(self,v):
> > >         return v
>
> > >     def escape(v):
> > >         return v
>
> > > if  __name__ == '__main__':
> > >     gert = Test()
> > >     print gert.m1('1')
> > >     print Test.m2('2')
>
> > > Why doesn't this new style class work in python 2.5.1 ?
>
> > why should it ?
>
> I don't know I thought it was supported from 2.2?

oops the code is like this but doesn't work

class Test(object):

    def m1(self,v):
        return v

    def m2(v):
        return v

if  __name__ == '__main__':
    gert = Test()
    print gert.m1('1')
    print Test.m2('2')

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to