راهنمای پایتون¶
نکته
This tutorial is designed for programmers that are new to the Python language, not beginners who are new to programming.
پایتون یک زبان برنامهنویسی قدرتمند و آسان برای یادگیری است. این زبان دارای ساختمان دادههای سطح بالا و کارآمد و همچنین رویکردی ساده اما مؤثر به برنامه نویسی شیء گرا است. سینتکس زیبا و نوع دهی پویا در پایتون، به همراه طبیعت تفسیری آن، این زبان را به گزینه ای ایدهآل برای اسکریپتنویسی و توسعه سریع برنامه ها در بسیاری از حوزه ها و بر روی اکثر پلتفرم ها تبدیل کرده است.
The Python interpreter and the extensive standard library are freely available in source or binary form for all major platforms from the Python website, https://www.python.org/, and may be freely distributed. The same site also contains distributions of and pointers to many free third party Python modules, programs and tools, and additional documentation.
مفسر پایتون بهراحتی قابل گسترش با توابع و نوعهای داده جدیدی است که در زبانهای C یا C++ (یا زبانهای دیگر قابل فراخوانی از C) پیادهسازی شدهاند. پایتون همچنین بهعنوان یک زبان توسعه برای برنامههای قابل تنظیم مناسب است.
This tutorial introduces the reader informally to the basic concepts and features of the Python language and system. Be aware that it expects you to have a basic understanding of programming in general. It helps to have a Python interpreter handy for hands-on experience, but all examples are self-contained, so the tutorial can be read off-line as well.
برای توضیح اشیاء و ماژول های استاندارد، به The Python Standard Library مراجعه کنید. The Python Language Reference تعریف رسمی تری از زبان ارائه می دهد. برای نوشتن افزونه ها به زبان C یا C++، Extending and Embedding the Python Interpreter و Python/C API Reference Manual را مطالعه کنید. همچنین چندین کتاب وجود دارد که به طور عمیق به زبان پایتون پرداختهاند.
این آموزش سعی نمیکند جامع باشد و تک تک ویژگیها یا حتی هر ویژگی معمولی را پوشش دهد. بلکه، بسیاری از ویژگیهای برجسته پایتون را معرفی می کند و به شما ایدهای خوب از سبک و طعم زبان پایتون می دهد. پس از خواندن آن، شما قادر خواهید بود ماژولها و برنامه های پایتون را بخوانید و بنویسید و آماده هستید تا در مورد ماژولهای کتابخانه مختلف پایتون که در The Python Standard Library توضیح داده شدهاند، بیشتر یاد بگیرید.
Glossary نیز ارزش مرور کردن دارد.
- 1. Whetting Your Appetite
- 2. Using the Python Interpreter
- 3. An Informal Introduction to Python
- 4. More Control Flow Tools
- 4.1.
ifStatements - 4.2.
forStatements - 4.3. The
range()Function - 4.4.
breakandcontinueStatements - 4.5.
elseClauses on Loops - 4.6.
passStatements - 4.7.
matchStatements - 4.8. Defining Functions
- 4.9. More on Defining Functions
- 4.10. Intermezzo: Coding Style
- 4.1.
- 5. Data Structures
- 6. Modules
- 7. Input and Output
- 8. خطاها و استثناها
- 9. کلاس ها
- 10. Brief Tour of the Standard Library
- 10.1. Operating System Interface
- 10.2. File Wildcards
- 10.3. Command Line Arguments
- 10.4. Error Output Redirection and Program Termination
- 10.5. String Pattern Matching
- 10.6. Mathematics
- 10.7. Internet Access
- 10.8. Dates and Times
- 10.9. Data Compression
- 10.10. Performance Measurement
- 10.11. Quality Control
- 10.12. Batteries Included
- 11. Brief Tour of the Standard Library --- Part II
- 12. Virtual Environments and Packages
- 13. What Now?
- 14. Interactive Input Editing and History Substitution
- 15. Floating-Point Arithmetic: Issues and Limitations
- 16. پیوست