Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > media > contrib-backports > by-pkgid > 3ba3bd1608c672ba2129b098a48e9e4d > files > 640

python3-docs-3.2.2-3mdv2010.2.noarch.rpm



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>3. Built-in Constants &mdash; Python v3.2.2 documentation</title>
    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '3.2.2',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <script type="text/javascript" src="../_static/sidebar.js"></script>
    <link rel="search" type="application/opensearchdescription+xml"
          title="Search within Python v3.2.2 documentation"
          href="../_static/opensearch.xml"/>
    <link rel="author" title="About these documents" href="../about.html" />
    <link rel="copyright" title="Copyright" href="../copyright.html" />
    <link rel="top" title="Python v3.2.2 documentation" href="../index.html" />
    <link rel="up" title="The Python Standard Library" href="index.html" />
    <link rel="next" title="4. Built-in Types" href="stdtypes.html" />
    <link rel="prev" title="2. Built-in Functions" href="functions.html" />
    <link rel="shortcut icon" type="image/png" href="../_static/py.png" />
 

  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="stdtypes.html" title="4. Built-in Types"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="functions.html" title="2. Built-in Functions"
             accesskey="P">previous</a> |</li>
        <li><img src="../_static/py.png" alt=""
                 style="vertical-align: middle; margin-top: -1px"/></li>
        <li><a href="../index.html">Python v3.2.2 documentation</a> &raquo;</li>

          <li><a href="index.html" accesskey="U">The Python Standard Library</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="built-in-constants">
<span id="built-in-consts"></span><h1>3. Built-in Constants<a class="headerlink" href="#built-in-constants" title="Permalink to this headline">¶</a></h1>
<p>A small number of constants live in the built-in namespace.  They are:</p>
<dl class="data">
<dt id="False">
<tt class="descname">False</tt><a class="headerlink" href="#False" title="Permalink to this definition">¶</a></dt>
<dd><p>The false value of the <a class="reference internal" href="functions.html#bool" title="bool"><tt class="xref py py-class docutils literal"><span class="pre">bool</span></tt></a> type. Assignments to <tt class="xref docutils literal"><span class="pre">False</span></tt>
are illegal and raise a <a class="reference internal" href="exceptions.html#SyntaxError" title="SyntaxError"><tt class="xref py py-exc docutils literal"><span class="pre">SyntaxError</span></tt></a>.</p>
</dd></dl>

<dl class="data">
<dt id="True">
<tt class="descname">True</tt><a class="headerlink" href="#True" title="Permalink to this definition">¶</a></dt>
<dd><p>The true value of the <a class="reference internal" href="functions.html#bool" title="bool"><tt class="xref py py-class docutils literal"><span class="pre">bool</span></tt></a> type. Assignments to <tt class="xref docutils literal"><span class="pre">True</span></tt>
are illegal and raise a <a class="reference internal" href="exceptions.html#SyntaxError" title="SyntaxError"><tt class="xref py py-exc docutils literal"><span class="pre">SyntaxError</span></tt></a>.</p>
</dd></dl>

<dl class="data">
<dt id="None">
<tt class="descname">None</tt><a class="headerlink" href="#None" title="Permalink to this definition">¶</a></dt>
<dd><p>The sole value of <tt class="xref py py-attr docutils literal"><span class="pre">types.NoneType</span></tt>.  <tt class="xref docutils literal"><span class="pre">None</span></tt> is frequently used to
represent the absence of a value, as when default arguments are not passed to a
function. Assignments to <tt class="xref docutils literal"><span class="pre">None</span></tt> are illegal and raise a <a class="reference internal" href="exceptions.html#SyntaxError" title="SyntaxError"><tt class="xref py py-exc docutils literal"><span class="pre">SyntaxError</span></tt></a>.</p>
</dd></dl>

<dl class="data">
<dt id="NotImplemented">
<tt class="descname">NotImplemented</tt><a class="headerlink" href="#NotImplemented" title="Permalink to this definition">¶</a></dt>
<dd><p>Special value which can be returned by the &#8220;rich comparison&#8221; special methods
(<a class="reference internal" href="../reference/datamodel.html#object.__eq__" title="object.__eq__"><tt class="xref py py-meth docutils literal"><span class="pre">__eq__()</span></tt></a>, <a class="reference internal" href="../reference/datamodel.html#object.__lt__" title="object.__lt__"><tt class="xref py py-meth docutils literal"><span class="pre">__lt__()</span></tt></a>, and friends), to indicate that the comparison
is not implemented with respect to the other type.</p>
</dd></dl>

<dl class="data">
<dt id="Ellipsis">
<tt class="descname">Ellipsis</tt><a class="headerlink" href="#Ellipsis" title="Permalink to this definition">¶</a></dt>
<dd><p>The same as <tt class="docutils literal"><span class="pre">...</span></tt>.  Special value used mostly in conjunction with extended
slicing syntax for user-defined container data types.</p>
</dd></dl>

<dl class="data">
<dt id="__debug__">
<tt class="descname">__debug__</tt><a class="headerlink" href="#__debug__" title="Permalink to this definition">¶</a></dt>
<dd><p>This constant is true if Python was not started with an <a class="reference internal" href="../using/cmdline.html#cmdoption-O"><em class="xref std std-option">-O</em></a> option.
See also the <a class="reference internal" href="../reference/simple_stmts.html#assert"><tt class="xref std std-keyword docutils literal"><span class="pre">assert</span></tt></a> statement.</p>
</dd></dl>

<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The names <a class="reference internal" href="#None" title="None"><tt class="xref py py-data xref docutils literal"><span class="pre">None</span></tt></a>, <a class="reference internal" href="#False" title="False"><tt class="xref py py-data xref docutils literal"><span class="pre">False</span></tt></a>, <a class="reference internal" href="#True" title="True"><tt class="xref py py-data xref docutils literal"><span class="pre">True</span></tt></a> and <a class="reference internal" href="#__debug__" title="__debug__"><tt class="xref py py-data docutils literal"><span class="pre">__debug__</span></tt></a>
cannot be reassigned (assignments to them, even as an attribute name, raise
<a class="reference internal" href="exceptions.html#SyntaxError" title="SyntaxError"><tt class="xref py py-exc docutils literal"><span class="pre">SyntaxError</span></tt></a>), so they can be considered &#8220;true&#8221; constants.</p>
</div>
<div class="section" id="constants-added-by-the-site-module">
<h2>3.1. Constants added by the <a class="reference internal" href="site.html#module-site" title="site: Module responsible for site-specific configuration."><tt class="xref py py-mod docutils literal"><span class="pre">site</span></tt></a> module<a class="headerlink" href="#constants-added-by-the-site-module" title="Permalink to this headline">¶</a></h2>
<p>The <a class="reference internal" href="site.html#module-site" title="site: Module responsible for site-specific configuration."><tt class="xref py py-mod docutils literal"><span class="pre">site</span></tt></a> module (which is imported automatically during startup, except
if the <a class="reference internal" href="../using/cmdline.html#cmdoption-S"><em class="xref std std-option">-S</em></a> command-line option is given) adds several constants to the
built-in namespace.  They are useful for the interactive interpreter shell and
should not be used in programs.</p>
<dl class="data">
<dt id="quit">
<tt class="descname">quit</tt><big>(</big><em>code=None</em><big>)</big><a class="headerlink" href="#quit" title="Permalink to this definition">¶</a></dt>
<dt id="exit">
<tt class="descname">exit</tt><big>(</big><em>code=None</em><big>)</big><a class="headerlink" href="#exit" title="Permalink to this definition">¶</a></dt>
<dd><p>Objects that when printed, print a message like &#8220;Use quit() or Ctrl-D
(i.e. EOF) to exit&#8221;, and when called, raise <a class="reference internal" href="exceptions.html#SystemExit" title="SystemExit"><tt class="xref py py-exc docutils literal"><span class="pre">SystemExit</span></tt></a> with the
specified exit code.</p>
</dd></dl>

<dl class="data">
<dt id="copyright">
<tt class="descname">copyright</tt><a class="headerlink" href="#copyright" title="Permalink to this definition">¶</a></dt>
<dt id="license">
<tt class="descname">license</tt><a class="headerlink" href="#license" title="Permalink to this definition">¶</a></dt>
<dt id="credits">
<tt class="descname">credits</tt><a class="headerlink" href="#credits" title="Permalink to this definition">¶</a></dt>
<dd><p>Objects that when printed, print a message like &#8220;Type license() to see the
full license text&#8221;, and when called, display the corresponding text in a
pager-like fashion (one screen at a time).</p>
</dd></dl>

</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../contents.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">3. Built-in Constants</a><ul>
<li><a class="reference internal" href="#constants-added-by-the-site-module">3.1. Constants added by the <tt class="docutils literal"><span class="pre">site</span></tt> module</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="functions.html"
                        title="previous chapter">2. Built-in Functions</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="stdtypes.html"
                        title="next chapter">4. Built-in Types</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
  <li><a href="../bugs.html">Report a Bug</a></li>
  <li><a href="../_sources/library/constants.txt"
         rel="nofollow">Show Source</a></li>
</ul>

<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" size="18" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="stdtypes.html" title="4. Built-in Types"
             >next</a> |</li>
        <li class="right" >
          <a href="functions.html" title="2. Built-in Functions"
             >previous</a> |</li>
        <li><img src="../_static/py.png" alt=""
                 style="vertical-align: middle; margin-top: -1px"/></li>
        <li><a href="../index.html">Python v3.2.2 documentation</a> &raquo;</li>

          <li><a href="index.html" >The Python Standard Library</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
    &copy; <a href="../copyright.html">Copyright</a> 1990-2011, Python Software Foundation.
    <br />
    The Python Software Foundation is a non-profit corporation.  
    <a href="http://www.python.org/psf/donations/">Please donate.</a>
    <br />
    Last updated on Sep 04, 2011.
    <a href="../bugs.html">Found a bug</a>?
    <br />
    Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
    </div>

  </body>
</html>