class Test(object):
def __getitem__(self, index):
print index
t = Test()
t[0]
t[0, 1]
t[0, 1, ..., 9]
t[:]
t[0:]
t[0:1]
t[0:1:2]
t[0, 1, ..., 9, 0:1, :]
"""
0
(0, 1)
(0, 1, Ellipsis, 9)
slice(None, None, None)
slice(0, None, None)
slice(0, 1, None)
slice(0, 1, 2)
(0, 1, Ellipsis, 9, slice(0, 1, None), slice(None, None, None))
"""
服务器托管,北京服务器托管,服务器租用 http://www.fwqtg.net
机房租用,北京机房租用,IDC机房托管, http://www.e1idc.net