Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
bgoonz committed Jul 26, 2021
1 parent 58fe785 commit 856f902
Show file tree
Hide file tree
Showing 428 changed files with 14,421 additions and 3,927 deletions.
4 changes: 4 additions & 0 deletions DOCS/_static/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
\_static
========

<table><thead><tr class="header"><th></th><th>Name</th><th>Size</th><th>Modified</th><th></th></tr></thead><tbody><tr class="odd"><td></td><td><span class="goup">..</span></td><td>—</td><td>—</td><td></td></tr><tr class="even"><td></td><td><span class="name">basic.css</span></td><td>11 KB</td><td>Mon Jul 26 22:29:09 2021</td><td></td></tr><tr class="odd"><td></td><td><span class="name">classic.css</span></td><td>4 KB</td><td>Mon Jul 26 22:29:09 2021</td><td></td></tr><tr class="even"><td></td><td><span class="name">copybutton.js</span></td><td>2 KB</td><td>Mon Jul 26 22:29:09 2021</td><td></td></tr><tr class="odd"><td></td><td><span class="name">default.css</span></td><td>28 bytes</td><td>Mon Jul 26 22:29:09 2021</td><td></td></tr><tr class="even"><td></td><td><span class="name">doctools.js</span></td><td>9 KB</td><td>Mon Jul 26 22:29:09 2021</td><td></td></tr><tr class="odd"><td></td><td><span class="name">documentation_options.js</span></td><td>323 bytes</td><td>Mon Jul 26 22:29:09 2021</td><td></td></tr><tr class="even"><td></td><td><span class="name">file.png</span></td><td>286 bytes</td><td>Mon Jul 26 22:29:09 2021</td><td></td></tr><tr class="odd"><td></td><td><span class="name">jquery.js</span></td><td>161 KB</td><td>Mon Jul 26 22:29:09 2021</td><td></td></tr><tr class="even"><td></td><td><span class="name">language_data.js</span></td><td>11 KB</td><td>Mon Jul 26 22:29:09 2021</td><td></td></tr><tr class="odd"><td></td><td><span class="name">py.png</span></td><td>695 bytes</td><td>Mon Jul 26 22:29:09 2021</td><td></td></tr><tr class="even"><td></td><td><span class="name">pydoctheme.css</span></td><td>2 KB</td><td>Mon Jul 26 22:29:09 2021</td><td></td></tr><tr class="odd"><td></td><td><span class="name">pygments.css</span></td><td>4 KB</td><td>Mon Jul 26 22:29:09 2021</td><td></td></tr><tr class="even"><td></td><td><span class="name">right.html</span></td><td>2 KB</td><td>Mon Jul 26 22:29:09 2021</td><td></td></tr><tr class="odd"><td></td><td><span class="name">right.md</span></td><td>1 KB</td><td>Mon Jul 26 22:29:09 2021</td><td></td></tr><tr class="even"><td></td><td><span class="name">sidebar.js</span></td><td>6 KB</td><td>Mon Jul 26 22:29:09 2021</td><td></td></tr><tr class="odd"><td></td><td><span class="name">switchers.js</span></td><td>6 KB</td><td>Mon Jul 26 22:29:09 2021</td><td></td></tr><tr class="even"><td></td><td><span class="name">underscore.js</span></td><td>17 KB</td><td>Mon Jul 26 22:29:09 2021</td><td></td></tr></tbody></table>
4 changes: 4 additions & 0 deletions DOCS/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
DOCS
====

<table><thead><tr class="header"><th></th><th>Name</th><th>Size</th><th>Modified</th><th></th></tr></thead><tbody><tr class="odd"><td></td><td><span class="goup">..</span></td><td>—</td><td>—</td><td></td></tr><tr class="even"><td></td><td><span class="name">_static</span></td><td>—</td><td>Mon Jul 26 22:37:18 2021</td><td></td></tr><tr class="odd"><td></td><td><span class="name">tutorial</span></td><td>—</td><td>Mon Jul 26 22:29:09 2021</td><td></td></tr><tr class="even"><td></td><td><span class="name">right.html</span></td><td>890 bytes</td><td>Mon Jul 26 22:29:09 2021</td><td></td></tr><tr class="odd"><td></td><td><span class="name">right.md</span></td><td>123 bytes</td><td>Mon Jul 26 22:29:09 2021</td><td></td></tr></tbody></table>
4 changes: 2 additions & 2 deletions DOCS/tutorial/appendix.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ <h3 id="navigation">Navigation</h3>
<a href="https://docs.python.org/3/index.html">3.9.5 Documentation</a> »
</li>
<li><a href="index.html">The Python Tutorial</a> »</li>
<li><div class="line-block"></div></li>
<li></li>
</ul>
<p><span id="tut-appendix"></span></p>
<h1 id="appendix">
Expand Down Expand Up @@ -376,7 +376,7 @@ <h3 id="navigation-1">Navigation</h3>
<a href="https://docs.python.org/3/index.html">3.9.5 Documentation</a> »
</li>
<li><a href="index.html">The Python Tutorial</a> »</li>
<li><div class="line-block"></div></li>
<li></li>
</ul>
<p>
©
Expand Down
60 changes: 31 additions & 29 deletions DOCS/tutorial/appendix.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
### Navigation

- [index](https://docs.python.org/3/genindex.html "General Index")
- [modules](https://docs.python.org/3/py-modindex.html "Python Module Index") |
- [next](https://docs.python.org/3/using/index.html "Python Setup and Usage") |
- [previous](floatingpoint.html "15. Floating Point Arithmetic: Issues and Limitations") |
- ![](../_static/py.png)
- [Python](https://www.python.org/) »
- [3.9.5 Documentation](https://docs.python.org/3/index.html) »
- [The Python Tutorial](index.html) »
-
- [index](https://docs.python.org/3/genindex.html "General Index")
- [modules](https://docs.python.org/3/py-modindex.html "Python Module Index") |
- [next](https://docs.python.org/3/using/index.html "Python Setup and Usage") |
- [previous](floatingpoint.html "15. Floating Point Arithmetic: Issues and Limitations") |
- ![](../_static/py.png)
- [Python](https://www.python.org/) »
- [3.9.5 Documentation](https://docs.python.org/3/index.html) »
- [The Python Tutorial](index.html) »
-

<span id="tut-appendix"></span>

# <span class="section-number">16. </span>Appendix<a href="#appendix" class="headerlink" title="Permalink to this headline">¶</a>
<span class="section-number">16. </span>Appendix<a href="#appendix" class="headerlink" title="Permalink to this headline">¶</a>
===============================================================================================================================

<span id="tut-interac"></span>

## <span class="section-number">16.1. </span>Interactive Mode<a href="#interactive-mode" class="headerlink" title="Permalink to this headline">¶</a>
<span class="section-number">16.1. </span>Interactive Mode<a href="#interactive-mode" class="headerlink" title="Permalink to this headline">¶</a>
-------------------------------------------------------------------------------------------------------------------------------------------------

<span id="tut-error"></span>

Expand Down Expand Up @@ -50,7 +52,7 @@ When you use Python interactively, it is frequently handy to have some standard

This file is only read in interactive sessions, not when Python reads commands from a script, and not when `/dev/tty` is given as the explicit source of commands (which otherwise behaves like an interactive session). It is executed in the same namespace where interactive commands are executed, so that objects that it defines or imports can be used without qualification in the interactive session. You can also change the prompts `sys.ps1` and `sys.ps2` in this file.

If you want to read an additional start-up file from the current directory, you can program this in the global start-up file using code like `if os.path.isfile('.pythonrc.py'): exec(open('.pythonrc.py').read())`. If you want to use the startup file in a script, you must do this explicitly in the script:
If you want to read an additional start-up file from the current directory, you can program this in the global start-up file using code like `if os.path.isfile('.pythonrc.py'): exec(open('.pythonrc.py').read())`. If you want to use the startup file in a script, you must do this explicitly in the script:

import os
filename = os.environ.get('PYTHONSTARTUP')
Expand Down Expand Up @@ -80,12 +82,12 @@ A problem with the GNU Readline package may prevent this.

### [Table of Contents](https://docs.python.org/3/contents.html)

- <a href="#" class="reference internal">16. Appendix</a>
- <a href="#interactive-mode" class="reference internal">16.1. Interactive Mode</a>
- <a href="#error-handling" class="reference internal">16.1.1. Error Handling</a>
- <a href="#executable-python-scripts" class="reference internal">16.1.2. Executable Python Scripts</a>
- <a href="#the-interactive-startup-file" class="reference internal">16.1.3. The Interactive Startup File</a>
- <a href="#the-customization-modules" class="reference internal">16.1.4. The Customization Modules</a>
- <a href="#" class="reference internal">16. Appendix</a>
- <a href="#interactive-mode" class="reference internal">16.1. Interactive Mode</a>
- <a href="#error-handling" class="reference internal">16.1.1. Error Handling</a>
- <a href="#executable-python-scripts" class="reference internal">16.1.2. Executable Python Scripts</a>
- <a href="#the-interactive-startup-file" class="reference internal">16.1.3. The Interactive Startup File</a>
- <a href="#the-customization-modules" class="reference internal">16.1.4. The Customization Modules</a>

#### Previous topic

Expand All @@ -97,20 +99,20 @@ A problem with the GNU Readline package may prevent this.

### This Page

- [Report a Bug](https://docs.python.org/3/bugs.html)
- [Show Source](https://github.com/python/cpython/blob/3.9/Doc/tutorial/appendix.rst)
- [Report a Bug](https://docs.python.org/3/bugs.html)
- [Show Source](https://github.com/python/cpython/blob/3.9/Doc/tutorial/appendix.rst)

### Navigation

- [index](https://docs.python.org/3/genindex.html "General Index")
- [modules](https://docs.python.org/3/py-modindex.html "Python Module Index") |
- [next](https://docs.python.org/3/using/index.html "Python Setup and Usage") |
- [previous](floatingpoint.html "15. Floating Point Arithmetic: Issues and Limitations") |
- ![](../_static/py.png)
- [Python](https://www.python.org/) »
- [3.9.5 Documentation](https://docs.python.org/3/index.html) »
- [The Python Tutorial](index.html) »
-
- [index](https://docs.python.org/3/genindex.html "General Index")
- [modules](https://docs.python.org/3/py-modindex.html "Python Module Index") |
- [next](https://docs.python.org/3/using/index.html "Python Setup and Usage") |
- [previous](floatingpoint.html "15. Floating Point Arithmetic: Issues and Limitations") |
- ![](../_static/py.png)
- [Python](https://www.python.org/) »
- [3.9.5 Documentation](https://docs.python.org/3/index.html) »
- [The Python Tutorial](index.html) »
-

© [Copyright](https://docs.python.org/3/copyright.html) 2001-2021, Python Software Foundation.
The Python Software Foundation is a non-profit corporation. [Please donate.](https://www.python.org/psf/donations/)
Expand Down
4 changes: 2 additions & 2 deletions DOCS/tutorial/appetite.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ <h3 id="navigation">Navigation</h3>
<a href="https://docs.python.org/3/index.html">3.9.5 Documentation</a> »
</li>
<li><a href="index.html">The Python Tutorial</a> »</li>
<li><div class="line-block"></div></li>
<li></li>
</ul>
<p><span id="tut-intro"></span></p>
<h1 id="whetting-your-appetite">
Expand Down Expand Up @@ -214,7 +214,7 @@ <h3 id="navigation-1">Navigation</h3>
<a href="https://docs.python.org/3/index.html">3.9.5 Documentation</a> »
</li>
<li><a href="index.html">The Python Tutorial</a> »</li>
<li><div class="line-block"></div></li>
<li></li>
</ul>
<p>
©
Expand Down
53 changes: 27 additions & 26 deletions DOCS/tutorial/appetite.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
### Navigation

- [index](https://docs.python.org/3/genindex.html "General Index")
- [modules](https://docs.python.org/3/py-modindex.html "Python Module Index") |
- [next](interpreter.html "2. Using the Python Interpreter") |
- [previous](index.html "The Python Tutorial") |
- ![](../_static/py.png)
- [Python](https://www.python.org/) »
- [3.9.5 Documentation](https://docs.python.org/3/index.html) »
- [The Python Tutorial](index.html) »
-
- [index](https://docs.python.org/3/genindex.html "General Index")
- [modules](https://docs.python.org/3/py-modindex.html "Python Module Index") |
- [next](interpreter.html "2. Using the Python Interpreter") |
- [previous](index.html "The Python Tutorial") |
- ![](../_static/py.png)
- [Python](https://www.python.org/) »
- [3.9.5 Documentation](https://docs.python.org/3/index.html) »
- [The Python Tutorial](index.html) »
-

<span id="tut-intro"></span>

# <span class="section-number">1. </span>Whetting Your Appetite<a href="#whetting-your-appetite" class="headerlink" title="Permalink to this headline">¶</a>
<span class="section-number">1. </span>Whetting Your Appetite<a href="#whetting-your-appetite" class="headerlink" title="Permalink to this headline">¶</a>
==========================================================================================================================================================

If you do much work on computers, eventually you find that there’s some task you’d like to automate. For example, you may wish to perform a search-and-replace over a large number of text files, or rename and rearrange a bunch of photo files in a complicated way. Perhaps you’d like to write a small custom database, or a specialized GUI application, or a simple game.

Expand All @@ -22,21 +23,21 @@ Python is just the language for you.

You could write a Unix shell script or Windows batch files for some of these tasks, but shell scripts are best at moving around files and changing text data, not well-suited for GUI applications or games. You could write a C/C++/Java program, but it can take a lot of development time to get even a first-draft program. Python is simpler to use, available on Windows, Mac OS X, and Unix operating systems, and will help you get the job done more quickly.

Python is simple to use, but it is a real programming language, offering much more structure and support for large programs than shell scripts or batch files can offer. On the other hand, Python also offers much more error checking than C, and, being a _very-high-level language_, it has high-level data types built in, such as flexible arrays and dictionaries. Because of its more general data types Python is applicable to a much larger problem domain than Awk or even Perl, yet many things are at least as easy in Python as in those languages.
Python is simple to use, but it is a real programming language, offering much more structure and support for large programs than shell scripts or batch files can offer. On the other hand, Python also offers much more error checking than C, and, being a *very-high-level language*, it has high-level data types built in, such as flexible arrays and dictionaries. Because of its more general data types Python is applicable to a much larger problem domain than Awk or even Perl, yet many things are at least as easy in Python as in those languages.

Python allows you to split your program into modules that can be reused in other Python programs. It comes with a large collection of standard modules that you can use as the basis of your programs — or as examples to start learning to program in Python. Some of these modules provide things like file I/O, system calls, sockets, and even interfaces to graphical user interface toolkits like Tk.

Python is an interpreted language, which can save you considerable time during program development because no compilation and linking is necessary. The interpreter can be used interactively, which makes it easy to experiment with features of the language, to write throw-away programs, or to test functions during bottom-up program development. It is also a handy desk calculator.

Python enables programs to be written compactly and readably. Programs written in Python are typically much shorter than equivalent C, C++, or Java programs, for several reasons:

- the high-level data types allow you to express complex operations in a single statement;
- the high-level data types allow you to express complex operations in a single statement;

- statement grouping is done by indentation instead of beginning and ending brackets;
- statement grouping is done by indentation instead of beginning and ending brackets;

- no variable or argument declarations are necessary.
- no variable or argument declarations are necessary.

Python is _extensible_: if you know how to program in C it is easy to add a new built-in function or module to the interpreter, either to perform critical operations at maximum speed, or to link Python programs to libraries that may only be available in binary form (such as a vendor-specific graphics library). Once you are really hooked, you can link the Python interpreter into an application written in C and use it as an extension or command language for that application.
Python is *extensible*: if you know how to program in C it is easy to add a new built-in function or module to the interpreter, either to perform critical operations at maximum speed, or to link Python programs to libraries that may only be available in binary form (such as a vendor-specific graphics library). Once you are really hooked, you can link the Python interpreter into an application written in C and use it as an extension or command language for that application.

By the way, the language is named after the BBC show “Monty Python’s Flying Circus” and has nothing to do with reptiles. Making references to Monty Python skits in documentation is not only allowed, it is encouraged!

Expand All @@ -56,20 +57,20 @@ The rest of the tutorial introduces various features of the Python language and

### This Page

- [Report a Bug](https://docs.python.org/3/bugs.html)
- [Show Source](https://github.com/python/cpython/blob/3.9/Doc/tutorial/appetite.rst)
- [Report a Bug](https://docs.python.org/3/bugs.html)
- [Show Source](https://github.com/python/cpython/blob/3.9/Doc/tutorial/appetite.rst)

### Navigation

- [index](https://docs.python.org/3/genindex.html "General Index")
- [modules](https://docs.python.org/3/py-modindex.html "Python Module Index") |
- [next](interpreter.html "2. Using the Python Interpreter") |
- [previous](index.html "The Python Tutorial") |
- ![](../_static/py.png)
- [Python](https://www.python.org/) »
- [3.9.5 Documentation](https://docs.python.org/3/index.html) »
- [The Python Tutorial](index.html) »
-
- [index](https://docs.python.org/3/genindex.html "General Index")
- [modules](https://docs.python.org/3/py-modindex.html "Python Module Index") |
- [next](interpreter.html "2. Using the Python Interpreter") |
- [previous](index.html "The Python Tutorial") |
- ![](../_static/py.png)
- [Python](https://www.python.org/) »
- [3.9.5 Documentation](https://docs.python.org/3/index.html) »
- [The Python Tutorial](index.html) »
-

© [Copyright](https://docs.python.org/3/copyright.html) 2001-2021, Python Software Foundation.
The Python Software Foundation is a non-profit corporation. [Please donate.](https://www.python.org/psf/donations/)
Expand Down
Loading

0 comments on commit 856f902

Please sign in to comment.