組み込み定数
************

組み込み名前空間にはいくつかの定数があります。定数の一覧:

False

   "bool" 型の偽値です。"False" への代入は不正で、"SyntaxError" を送出
   します。

True

   "bool" 型の真値です。"True" への代入は不正で、"SyntaxError" を送出
   します。

None

   関数にデフォルト引数が渡されなかったときなどに、値の非存在を表すの
   に頻繁に用いられるオブジェクトです。"None" への代入は不正で、
   "SyntaxError" を送出します。"None" が "NoneType" 型の唯一のインスタ
   ンスです。

NotImplemented

   特殊な二項演算のメソッド (e.g. "__eq__()", "__lt__()", "__add__()",
   "__rsub__()", etc.) が、他の型に対して演算が実装されていないことを
   示すために返す特殊値です。インプレースの特殊な二項演算のメソッド
   (e.g. "__imul__()", "__iand__()", etc.) も同じ理由でこの値を返すこ
   とがあります。この処理では真偽値コンテキストでの評価はしてはいけま
   せん。"NotImplemented" が "types.NotImplementedType" 型の唯一のイン
   スタンスです。

   注釈:

     二項演算の (あるいはインプレースの) メソッドが "NotImplemented"
     を返した場合、インタープリタはもう一方の型で定義された対の演算で
     代用を試みます (あるいは演算によっては他の代替手段も試みます)。試
     行された演算全てが "NotImplemented" を返した場合、インタープリタ
     は適切な例外を送出します。 "NotImplemented" を正しく返さないと、
     誤解を招きかねないエラーメッセージになったり、 "NotImplemented"
     が Python コードに返されるようなことになります。例として 算術演算
     の実装 を参照してください。

   注意:

     "NotImplemented" and "NotImplementedError" are not
     interchangeable. This constant should only be used as described
     above; see "NotImplementedError" for details on correct usage of
     the exception.

   バージョン 3.9 で変更: Evaluating "NotImplemented" in a boolean
   context was deprecated.

   バージョン 3.14 で変更: Evaluating "NotImplemented" in a boolean
   context now raises a "TypeError". It previously evaluated to "True"
   and emitted a "DeprecationWarning" since Python 3.9.

Ellipsis

   The same as the ellipsis literal ""..."", an object frequently used
   to indicate that something is omitted. Assignment to "Ellipsis" is
   possible, but assignment to  "..." raises a "SyntaxError".
   "Ellipsis" is the sole instance of the "types.EllipsisType" type.

__debug__

   この定数は、Python が "-O" オプションを有効にして開始されたのでなけ
   れば真です。 "assert" 文も参照して下さい。

注釈:

  名前 "None" 、 "False" 、 "True" 、 "__debug__" は再代入できない (こ
  れらに対する代入は、たとえ属性名としてであっても "SyntaxError" が送
  出されます) ので、これらは「真の」定数であると考えられます。


"site" モジュールで追加される定数
=================================

"site" モジュール ("-S" コマンドラインオプションが指定されない限り、ス
タートアップ時に自動的にインポートされます) は組み込み名前空間にいくつ
かの定数を追加します。それらは対話的インタープリタシェルで有用ですが、
プログラム中では使うべきではありません。

quit(code=None)
exit(code=None)

   Objects that when printed, print a message like "Use quit() or
   Ctrl-D (i.e. EOF) to exit", and when accessed directly in the
   interactive interpreter or called as functions, raise "SystemExit"
   with the specified exit code.

help

   Object that when printed, prints the message "Type help() for
   interactive help, or help(object) for help about object.", and when
   accessed directly in the interactive interpreter, invokes the
   built-in help system (see "help()").

copyright
credits

   表示あるいは呼び出されたときに、それぞれ著作権あるいはクレジットの
   テキストが表示されるオブジェクトです。

license

   表示されたときに "Type license() to see the full license text" とい
   うメッセージを表示し、呼び出されたときには完全なライセンスのテキス
   トをページャのような形式で (1画面分づつ) 表示するオブジェクトです。
