Ellipsis
¶
The same as the ellipsis literal “...
”. Special value used mostly in conjunction with extended slicing syntax for user-defined container data types.
__debug__
This constant is true if Python was not started with an -O
option. See also the assert
statement.
Note
The names None
, False
, True
and __debug__
cannot be reassigned (assignments to them, even as an attribute name, raise SyntaxError
), so they can be considered “true” constants.
# 代码中出现...省略号的现象就是一个Ellipsis对象
L = [1,2,3]
L.append(L)
print(L) # [1,2,3,[…]]