10477777 发表于 2018-8-16 11:18:12

Python学习笔记1:Self-91ctt

class Test:  
    def prt(self):
  
      print(self)
  
      print(self.__class__)
  
    def prt1(this):
  
      print(this)
  
      print(this.__class__)
  
    def prt2():
  
      print(__class__)
  
    def __get__(self, ins, cls):
  
      #print('self in Desc: %s ' % self )
  
      print(self, ins, cls)
  

  
t = Test()
  
t.__get__('ad','cs')


页: [1]
查看完整版本: Python学习笔记1:Self-91ctt