1 line
143 KiB
JSON
1 line
143 KiB
JSON
|
|
{">>>": {"title": ">>>", "body": "<main>\n<dd><p>The default Python prompt of the interactive shell. Often seen for code\nexamples which can be executed interactively in the interpreter.</p>\n</dd>\n</main>\n"}, "...": {"title": "...", "body": "<main>\n<dd><p>Can refer to:</p>\n<ul class=\"simple\">\n<li><p>The default Python prompt of the interactive shell when entering the\ncode for an indented code block, when within a pair of matching left and\nright delimiters (parentheses, square brackets, curly braces or triple\nquotes), or after specifying a decorator.</p></li>\n<li><p>The <a class=\"reference internal\" href=\"library/constants.html#Ellipsis\" title=\"Ellipsis\"><code class=\"xref py py-const docutils literal notranslate\"><span class=\"pre\">Ellipsis</span></code></a> built-in constant.</p></li>\n</ul>\n</dd>\n</main>\n"}, "2to3": {"title": "2to3", "body": "<main>\n<dd><p>A tool that tries to convert Python 2.x code to Python 3.x code by\nhandling most of the incompatibilities which can be detected by parsing the\nsource and traversing the parse tree.</p>\n<p>2to3 is available in the standard library as <a class=\"reference internal\" href=\"library/2to3.html#module-lib2to3\" title=\"lib2to3: The 2to3 library\"><code class=\"xref py py-mod docutils literal notranslate\"><span class=\"pre\">lib2to3</span></code></a>; a standalone\nentry point is provided as <code class=\"file docutils literal notranslate\"><span class=\"pre\">Tools/scripts/2to3</span></code>. See\n<a class=\"reference internal\" href=\"library/2to3.html#to3-reference\"><span class=\"std std-ref\">2to3 \u2014 Automated Python 2 to 3 code translation</span></a>.</p>\n</dd>\n</main>\n"}, "abstract base class": {"title": "abstract base class", "body": "<main>\n<dd><p>Abstract base classes complement <a class=\"reference internal\" href=\"#term-duck-typing\"><span class=\"xref std std-term\">duck-typing</span></a> by\nproviding a way to define interfaces when other techniques like\n<a class=\"reference internal\" href=\"library/functions.html#hasattr\" title=\"hasattr\"><code class=\"xref py py-func docutils literal notranslate\"><span class=\"pre\">hasattr()</span></code></a> would be clumsy or subtly wrong (for example with\n<a class=\"reference internal\" href=\"reference/datamodel.html#special-lookup\"><span class=\"std std-ref\">magic methods</span></a>). ABCs introduce virtual\nsubclasses, which are classes that don\u2019t inherit from a class but are\nstill recognized by <a class=\"reference internal\" href=\"library/functions.html#isinstance\" title=\"isinstance\"><code class=\"xref py py-func docutils literal notranslate\"><span class=\"pre\">isinstance()</span></code></a> and <a class=\"reference internal\" href=\"library/functions.html#issubclass\" title=\"issubclass\"><code class=\"xref py py-func docutils literal notranslate\"><span class=\"pre\">issubclass()</span></code></a>; see the\n<a class=\"reference internal\" href=\"library/abc.html#module-abc\" title=\"abc: Abstract base classes according to :pep:`3119`.\"><code class=\"xref py py-mod docutils literal notranslate\"><span class=\"pre\">abc</span></code></a> module documentation. Python comes with many built-in ABCs for\ndata structures (in the <a class=\"reference internal\" href=\"library/collections.abc.html#module-collections.abc\" title=\"collections.abc: Abstract base classes for containers\"><code class=\"xref py py-mod docutils literal notranslate\"><span class=\"pre\">collections.abc</span></code></a> module), numbers (in the\n<a class=\"reference internal\" href=\"library/numbers.html#module-numbers\" title=\"numbers: Numeric abstract base classes (Complex, Real, Integral, etc.).\"><code class=\"xref py py-mod docutils literal notranslate\"><span class=\"pre\">numbers</span></code></a> module), streams (in the <a class=\"reference internal\" href=\"library/io.html#module-io\" title=\"io: Core tools for working with streams.\"><code class=\"xref py py-mod docutils literal notranslate\"><span class=\"pre\">io</span></code></a> module), import finders\nand loaders (in
|