Poloniu / nova_language_cache.json
noah33565's picture
Upload 62 files
d06797b verified
Raw History Blame Contribute Delete
7.87 kB
{
"python": {
"url": "https://docs.python.org/3/tutorial/",
"text": "The Python Tutorial — Python 3.14.8 documentation\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n\n \n \n \n \n \n \n \n\n \n\n\n\n \n \n \n\n \n \n\n\n\n\n \n \n\n \nNavigation\n\n \n \n\n index\n\n \n\n modules |\n\n \n\n next |\n\n \n\n previous |\n\n\n \n\n\n \nPython »\n\n \n\n \n\n\n \n\n\n \n\n \n\n \n \n\n \n\n 3.14.8 Documentation »\n \n\n\n \nThe Python Tutorial\n\n \n\n \n\n \n\n \n \n \n \n \n\n |\n \n\n \n\n\n Theme\n \n Auto\n Light\n Dark\n \n |\n\n \n \n \n \n\n \n\n \n\n \n\n \n\n \n \n\nThe Python Tutorial¶\n\n\n\n\nTip\n\n\nThis tutorial is designed for\nprogrammers that are new to the Python language,\nnot beginners who are new to programming.\n\n\n\n\nPython is an easy to learn, powerful programming language. It has efficient\nhigh-level data structures and a simple but effective approach to\nobject-oriented programming. Python’s elegant syntax and dynamic typing,\ntogether with its interpreted nature, make it an ideal language for scripting\nand rapid application development in many areas on most platforms.\n\n\nThe Python interpreter and the extensive standard library are freely available\nin source or binary form for all major platforms from the Python website,\nhttps://www.python.org/, and may be freely distributed. The same site also\ncontains distributions of and pointers to many free third party Python modules,\nprograms and tools, and additional documentation.\n\n\nThe Python interpreter is easily extended with new functions and data types\nimplemented in C or C++ (or other languages callable from C). Python is also\nsuitable as an extension language for customizable applications.\n\n\nThis tutorial introduces the reader informally to the basic concepts and\nfeatures of the Python language and system. Be aware that it expects you to\nhave a basic understanding of programming in general. It helps to have a Python\ninterpreter handy for hands-on experience, but all examples are self-contained,\nso the tutorial can be read off-line as well.\n\n\nFor a description of standard objects and modules, see Python built-ins reference and\nThe Python standard library. The Python Language Reference gives a more formal definition of\nthe language. To write extensions in C or C++, read Extending and Embedding the Python Interpreter and\nPython/C API reference manual. There are also several books covering Python in depth.\n\n\nThis tutorial does not attempt to be comprehensive and cover every single\nfeature, or even every commonly used feature. Instead, it introduces many of\nPython’s most noteworthy features, and will give you a good idea of the\nlanguage’s flavor and style. After reading it, you will be able to read and\nwrite Python modules and programs, and you will be ready to learn more about the\nvarious Python library modules described in The Python standard library.\n\n\nThe Glossary is also worth going through.\n\n\n\n\n\n1. Whetting Your Appetite\n\n\n2. Using the Python Interpreter\n\n2.1. Invoking the Interpreter\n\n2.1.1. Argument Passing\n\n\n2.1.2. Interactive Mode\n\n\n\n\n\n2.2. The Interpreter and Its Environment\n\n2.2.1. Source Code Encoding\n\n\n\n\n\n\n\n\n3. An Informal Introduction to Python\n\n3.1. Using Python as a Calculator\n\n3.1.1. Numbers\n\n\n3.1.2. Text\n\n\n3.1.3. Lists\n\n\n\n\n\n3.2. First Steps Towards Programming\n\n\n\n\n\n4. More Control Flow Tools\n\n4.1. if Statements\n\n\n4.2. for Statements\n\n\n4.3. The range() Function\n\n\n4.4. break and continue Statements\n\n\n4.5. else Clauses on Loops\n\n\n4.6. pass Statements\n\n\n4.7. match Statements\n\n\n4.8. Defining Functions\n\n\n4.9. More on Defining Functions\n\n4.9.1. Default Argument Values\n\n\n4.9.2. Keyword Arguments\n\n\n4.9.3. Special parameters\n\n4.9.3.1. Positional-or-Keyword Arguments\n\n\n4.9.3.2. Positional-Only Parameters\n\n\n4.9.3.3. Keyword-Only Arguments\n\n\n4.9.3.4. Function Examples\n\n\n4.9.3.5. Recap\n\n\n\n\n\n4.9.4. Arbitrary Argument Lists\n\n\n4.9.5. Unpacking Argument Lists\n\n\n4.9.6. Lambda Expressions\n\n\n4.9.7. Documentation Strings\n\n\n4.9.8. Function Annotations\n\n\n\n\n\n4.10. Intermezzo: Coding Style\n\n\n\n\n\n5. Data Structures\n\n5.1. More on Lists\n\n5.1.1. Using Lists as Stacks\n\n\n5.1.2. Using Lists as Queues\n\n\n5.1.3. List Comprehensions\n\n\n5.1.4. Nested List Comprehensions\n\n\n\n\n\n5.2. The del statement\n\n\n5.3. Tuples and Sequences\n\n\n5.4. Sets\n\n\n5.5. Dictionaries\n\n\n5.6. Looping Techniques\n\n\n5.7. More on Conditions\n\n\n5.8. Comparing Sequences and Other Types\n\n\n\n\n\n6. Modules\n\n6.1. More on Modules\n\n6.1.1. Executing modules as scripts\n\n\n6.1.2. The Module Search Path\n\n\n6.1.3. “Compiled” Python files\n\n\n\n\n\n6.2. Standard Modules\n\n\n6.3. The dir() Function\n\n\n6.4. Packages\n\n6.4.1. Importing * From a Package\n\n\n6.4.2. Intra-package References\n\n\n\n\n\n\n\n\n7. Input and Output\n\n7.1. Fancier Output Formatting\n\n7.1.1. Formatted String Literals\n\n\n7.1.2. The String format() Method\n\n\n7.1.3. Manual String Formatting\n\n\n7.1.4. Old string formatting\n\n\n\n\n\n7.2. Reading and Writing Files\n\n7.2.1. Methods of File Objects\n\n\n7.2.2. Saving structured data with json\n\n\n\n\n\n\n\n\n8. Errors and Exceptions\n\n8.1. Syntax Errors\n\n\n8.2. Exceptions\n\n\n8.3. Handling Exceptions\n\n\n8.4. Raising Exceptions\n\n\n8.5. Exception Chaining\n\n\n8.6. User-defined Exceptions\n\n\n8.7. Defining Clean-up Actions\n\n\n8.8. Predefined Clean-up Actions\n\n\n8.9. Raising and Handling Multiple Unrelated Exceptions\n\n\n8.10. Enriching Exceptions with Notes\n\n\n\n\n\n9. Classes\n\n9.1. A Word About Names and Objects\n\n\n9.2. Python Scopes and Namespaces\n\n9.2.1. Scopes and Namespaces Example\n\n\n\n\n\n9.3. A First Look at Classes\n\n9.3.1. Class Definition Syntax\n\n\n9.3.2. Class Objects\n\n\n9.3.3. Instance Objects\n\n\n9.3.4. Method Objects\n\n\n9.3.5. Class and Instance Variables\n\n\n\n\n\n9.4. Random Remarks\n\n\n9.5. Inheritance\n\n9.5.1. Multiple Inheritance\n\n\n\n\n\n9.6. Private Variables\n\n\n9.7. Odds and Ends\n\n\n9.8. Iterators\n\n\n9.9. Generators\n\n\n9.10. Generator Expressions\n\n\n\n\n\n10. Brief tour of the standard library\n\n10.1. Operating system interface\n\n\n10.2. File wildcards\n\n\n10.3. Command-line arguments\n\n\n10.4. Error output redirection and program termination\n\n\n10.5. String pattern matching\n\n\n10.6. Mathematics\n\n\n10.7. Internet access\n\n\n10.8. Dates and times\n\n\n10.9. Data compression\n\n\n10.10. Performance measurement\n\n\n10.11. Quality control\n\n\n10.12. Batteries included\n\n\n\n\n\n11. Brief tour of the standard library — part II\n\n11.1. Output formatting\n\n\n11.2. Templating\n\n\n11.3. Working with binary data record layouts\n\n\n11.4. Multi-threading\n\n\n11.5. Logging\n\n\n11.6. Weak references\n\n\n11.7. Tools for working with lists\n\n\n11.8. Decimal floating-point arithmetic\n\n\n\n\n\n12. Virtual Environments and Packages\n\n12.1. Introduction\n\n\n12.2. Creating Virtual Environments\n\n\n12.3. Managing Packages with pip\n\n\n\n\n\n13. What Now?\n\n\n14. Interactive Input Editing and History Substitution\n\n14.1. Tab Completion and History Editing\n\n\n14.2. Alternatives to the Interactive Interpreter\n\n\n\n\n\n15. Floating-Point Arithmetic: Issues and Limitations\n\n15.1. Representation Error\n\n\n\n\n\n16. Appendix\n\n16.1. Interactive Mode\n\n16.1.1. Error Handling\n\n\n16.1.2. Executable Python Scripts\n\n\n16.1.3. The Interactive Startup File\n\n\n16.1.4. The Customization Modules\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n\n\n \n\n \n\n \n\n \n\n \n\n \n\n \nPrevious topic\n\n \nChangelog\n\n \n\n \n\n \nNext topic\n\n \n1. Whetting Your Appetite\n\n \n\n \n \n\n \nThis page\n\n",
"fetched_at": 1791223607.8286273
}
}