Python之元组
2021-05-18 06:30
标签:known ice sam rabl tar *args def byte getattr 元组:tuple 如:(11,22,33) ,("hzw","cp") 每个元组都具有以下功能: Python之元组 标签:known ice sam rabl tar *args def byte getattr 原文地址:https://www.cnblogs.com/pythonlearing/p/9744973.htmlclass tuple(object):
"""
tuple() -> empty tuple
tuple(iterable) -> tuple initialized from iterable‘s items
If the argument is a tuple, the return value is the same object.
"""
def count(self, value): # real signature unknown; restored from __doc__
""" T.count(value) -> integer -- return number of occurrences of value """
return 0
def index(self, value, start=None, stop=None): # real signature unknown; restored from __doc__
"""
T.index(value, [start, [stop]]) -> integer -- return first index of value.
Raises ValueError if the value is not present.
"""
return 0
def __add__(self, y): # real signature unknown; restored from __doc__
""" x.__add__(y) x+y """
pass
def __contains__(self, y): # real signature unknown; restored from __doc__
""" x.__contains__(y) y in x """
pass
def __eq__(self, y): # real signature unknown; restored from __doc__
""" x.__eq__(y) x==y """
pass
def __getattribute__(self, name): # real signature unknown; restored from __doc__
""" x.__getattribute__(‘name‘) x.name """
pass
def __getitem__(self, y): # real signature unknown; restored from __doc__
""" x.__getitem__(y) x[y] """
pass
def __getnewargs__(self, *args, **kwargs): # real signature unknown
pass
def __getslice__(self, i, j): # real signature unknown; restored from __doc__
"""
x.__getslice__(i, j) x[i:j]
Use of negative indices is not supported.
"""
pass
def __ge__(self, y): # real signature unknown; restored from __doc__
""" x.__ge__(y) x>=y """
pass
def __gt__(self, y): # real signature unknown; restored from __doc__
""" x.__gt__(y) x>y """
pass
def __hash__(self): # real signature unknown; restored from __doc__
""" x.__hash__() hash(x) """
pass
def __init__(self, seq=()): # known special case of tuple.__init__
"""
tuple() -> empty tuple
tuple(iterable) -> tuple initialized from iterable‘s items
If the argument is a tuple, the return value is the same object.
# (copied from class doc)
"""
pass
def __iter__(self): # real signature unknown; restored from __doc__
""" x.__iter__() iter(x) """
pass
def __len__(self): # real signature unknown; restored from __doc__
""" x.__len__() len(x) """
pass
def __le__(self, y): # real signature unknown; restored from __doc__
""" x.__le__(y) x"""
pass
def __lt__(self, y): # real signature unknown; restored from __doc__
""" x.__lt__(y) x
上一篇:Python之集合