do has any way to do this not using '__init__'

Posted by zjm1126 on Stack Overflow See other posts from Stack Overflow or by zjm1126
Published on 2010-05-29T08:35:39Z Indexed on 2010/05/29 8:42 UTC
Read the original article Hit count: 126

Filed under:
class a(object):
    c=b()# how to call the b method 
    d=4
    def __init__(self):
        print self.c
    def b(self):
        return self.d+1

a()

how to call the 'b' method not in the __init__

thanks

© Stack Overflow or respective owner

Related posts about python