#!/usr/bin/python3
#-*-coding:UTF-8-*-

#__init__构造函数可以在对象创建后直接调用
class FooBar(object):

    def __init__(self,value):
        self.name=value

f=FooBar('xls')
print(f.name)



class Foobar(object):

    def __init__(self,name):

        self.name=name

    def foo(self):
        return self.name


fo=Foobar('zyp')
print(fo.foo())

177eb584d7f14c5c7e481a46f4407bd538badca8
<mask token>


class Foobar(object):

    def __init__(self, name):
        self.name = name

    def foo(self):
        return self.name


<mask token>

class FooBar(object):

    def __init__(self, value):
        self.name = value


<mask token>


class Foobar(object):

    def __init__(self, name):
        self.name = name

    def foo(self):
        return self.name


<mask token>

class FooBar(object):

    def __init__(self, value):
        self.name = value


<mask token>
print(f.name)


class Foobar(object):

    def __init__(self, name):
        self.name = name

    def foo(self):
        return self.name


<mask token>
print(fo.foo())

class FooBar(object):

    def __init__(self, value):
        self.name = value


f = FooBar('xls')
print(f.name)


class Foobar(object):

    def __init__(self, name):
        self.name = name

    def foo(self):
        return self.name


fo = Foobar('zyp')
print(fo.foo())

#!/usr/bin/python3
#-*-coding:UTF-8-*-

#__init__构造函数可以在对象创建后直接调用
class FooBar(object):

    def __init__(self,value):
        self.name=value

f=FooBar('xls')
print(f.name)



class Foobar(object):

    def __init__(self,name):

        self.name=name

    def foo(self):
        return self.name


fo=Foobar('zyp')
print(fo.foo())
