4. 내장 상수¶
작은 개수의 상수가 내장 이름 공간에 있습니다. 그것들은:
-
None¶ The sole value of
types.NoneType.Noneis frequently used to represent the absence of a value, as when default arguments are not passed to a function.버전 2.4에서 변경: Assignments to
Noneare illegal and raise aSyntaxError.
-
NotImplemented¶ Special value which can be returned by the 《rich comparison》 special methods (
__eq__(),__lt__(), and friends), to indicate that the comparison is not implemented with respect to the other type.
-
Ellipsis¶ Special value used in conjunction with extended slicing syntax.
참고
The names None and __debug__ cannot be reassigned
(assignments to them, even as an attribute name, raise SyntaxError),
so they can be considered 《true》 constants.
버전 2.7에서 변경: Assignments to __debug__ as an attribute became illegal.
4.1. site 모듈에 의해 추가된 상수들¶
site 모듈(-S 명령행 옵션이 주어진 경우를 제외하고는, 시작할 때 자동으로 임포트 됩니다)은 내장 이름 공간에 여러 상수를 추가합니다. 대화형 인터프리터 셸에 유용하고 프로그램에서 사용해서는 안 됩니다.
-
quit([code=None])¶ -
exit([code=None])¶ 인쇄될 때, 《Use quit() or Ctrl-D (i.e. EOF) to exit》과 같은 메시지를 인쇄하고, 호출될 때, 지정된 종료 코드로
SystemExit를 일으키는 객체.
-
license¶ 인쇄될 때 《Type license() to see the full license text》와 같은 메시지를 인쇄하고, 호출될 때 전체 라이센스 텍스트를 페이지 생성기와 같은 방식(한 번에 한 화면씩)으로 표시하는 객체입니다.
