物建基礎

  • object.new(cls[, ...])

    Called to create a new instance of class cls
    
  • object.init(self[, ...])

  • object.del(self)

  • object.repr(self)

    string representation of an object

  • object.str(self)

    built-in functions format() and print() to compute the “informal” or nicely printable string representation of an object

  • object.bytes(self) bytes() to compute a byte-string representation of an object

  • object.format(self, format_spec)

  • object.lt(self, other)

  • object.le(self, other)
  • object.eq(self, other)
  • object.ne(self, other)
  • object.gt(self, other)
  • object.ge(self, other)

  • object.hash(self) operations on members of hashed collections including set, frozenset, and dict. hash() should return an integer

  • object.bool(self)

物件屬性

  • object.getattr(self, name)
  • object.getattribute(self, name)
  • object.setattr(self, name, value)
  • object.delattr(self, name)

參考

results matching ""

    No results matching ""