Class SampleC():
    def __init__(self):
        pass

sample = SampleC()

>>> dir(sample)  # 인스턴스 객체의 속성 + 클래스 객체의 속성
>>> dir(SampleC) # 인스턴스 객체의 속성 + 클래스 객체의 속성 + 슈퍼클래스의 속성

>>> dir([])
>>> dir({})
>>> dir((,))

__repr__
__str__
__add__
__getitem__
__getattr__
__len__
__doc__
__name__
__dict__
__new__
__hash__
__delattr__
__setattr__
__class__
__name__
__call__
__nonzero__
__cmp__
__lt__
__le__
__gt__
__ge__
__eq__
__ne__
__delitem__
__contains__
__iter__
__add__
__sub__
__mul__
__div__
__truediv__
__floordiv__
__mod__
__divmod__
__pow__
__lshift__
__rshift__
__and__
__xor__
__or__
__radd__
__rsub__
__rdiv__
__rmul__
...
__iadd__
__isub__
__imul__
__idiv__
__itruediv__
__ifloordiv__
__imod__
__ipow__
__ilshift__
__irshift__
__iand__
__ixor__
__ior__
__neg__
__pos__
__abs__
__invert__
__complex__
__int__
__long__
__float__
__oct__
__hex__

Data model (Attribute)
http://docs.python.org/reference/datamodel.html
Built-in Functions
http://docs.python.org/library/functions.html
Built-in Types
http://docs.python.org/library/stdtypes.html  
 


'python' 카테고리의 다른 글

소인수 분해  (0) 2012.02.19
긴 문자열을 숫자로 바꾸는 코드  (0) 2012.02.19
[python] 비트맵 bitmap 쓰기  (0) 2011.11.04
[python] 복소수 complex 사용법  (0) 2011.11.04
[python] 삼항연산자 만들기  (1) 2011.11.02
Posted by Нуеоп