Powerful Object-Oriented Programming
Mark Lutz

#Python
#OOP
#syntax
🐍 این کتاب یک مقدمه جامع و عملی بر زبان برنامهنویسی پایتون ارائه میدهد و بر اساس دوره آموزشی محبوب مارک لوتز نوشته شده است. این ویرایش ششم بهروزرسانی شده و به شما کمک میکند تا سریعاً کدهای پایتون با کیفیت و بهینه بنویسید، چه تازهکار باشید و چه برنامهنویس حرفهای در سایر زبانها.
📝 ویژگیهای کتاب:
⚙️ مهارتهایی که کسب میکنید:
🌟 چرا این کتاب؟
📖 فهرست مطالب
بخش اول: شروع کار
بخش دوم: اشیاء و عملیات
4. معرفی اشیاء پایتون
5. اعداد و عبارات
6. مقدمهای بر تایپ دینامیک
7. مبانی رشتهها
8. لیستها و دیکشنریها
9. تاپلها، فایلها و سایر موارد
بخش سوم: دستورات و نحو
10. معرفی دستورات پایتون
11. انتسابها، عبارات و چاپ
12. انتخابهای if و match
13. حلقههای while و for
14. تکرارها و comprehensions
15. مقدمه مستندسازی
بخش چهارم: توابع و ژنراتورها
16. مبانی توابع
17. حوزهها
18. آرگومانها
19. جزئیات توابع
20. Comprehensions و ژنراتورها
21. مقدمهای بر بنچمارکینگ
بخش پنجم: ماژولها و بستهها
22. نمای کلی ماژولها
23. اصول کدنویسی ماژول
24. بستههای ماژول
25. جزئیات ماژول
بخش ششم: کلاسها و برنامهنویسی شیءگرا
26. برنامهنویسی شیءگرا: نمای کلی
27. اصول کدنویسی کلاس
28. مثال واقعیتر
29. جزئیات کلاس
30. بارگذاری عملگرها
31. طراحی با کلاسها
32. جزئیات کلاس
بخش هفتم: استثناها
33. اصول استثنا
34. جزئیات کدنویسی استثنا
35. اشیاء استثنا
36. جزئیات استثنا
بخش هشتم: مباحث پیشرفته
37. Unicode و Byte Strings
38. مدیریت Attributeها
39. دکوراتورها
40. متاکلاسها و ارثبری
41. جمعبندی
بخش نهم: پیوستها
👨🏫 درباره نویسنده:
مارک لوتز نویسنده کتابهای کلاسیک و بنیادین پایتون است و بیش از دو دهه تجربه آموزش پایتون به تازهکاران دارد. او نویسنده کتابهای Learning Python، Programming Python، Python Pocket Reference است و از سال 1992 پایتون را آموزش و ترویج کرده است. آثار منتشرشده او شامل 15 کتاب و بیش از 12 هزار صفحه است که پایتون 1.X تا 3.X را پوشش میدهد. مارک دارای مدرک کارشناسی و کارشناسی ارشد علوم کامپیوتر و تجربه کاری در حوزه کامپایلرها و سایر زمینهها است و به توسعه اپلیکیشنهای پایتون برای کامپیوتر و موبایل علاقهمند است.
Get a comprehensive, in-depth introduction to the core Python language with this hands-on book. Based on author Mark Lutz's popular training course, this updated sixth edition will help you quickly write efficient, high-quality code with Python. It's an ideal way to begin, whether you're new to programming or a professional developer versed in other languages.
Complete with quizzes, exercises, and helpful illustrations, this easy-to-follow self-paced tutorial gets you started with Python 3.12 and all other releases in use today. With a pragmatic focus on what you need to know, it also introduces some advanced language features that have become increasingly common in Python code.
This book helps you:
Why this Book?
This book is a tutorial on the Python language and a classic in its domain. It’s the product of three decades spent using, promoting, and teaching Python, and dates back to the mid-1990s, when Python was still at version 1.X, and the web was just something developers mused about over lunch. Although the focus here is firmly on the present, that legacy naturally adds some historical context that will help you understand Python more deeply. Despite what you may have heard, the past matters, especially in knowledge-based fields.
Just as importantly, this book has always been based on live-and-in-person feedback from Python beginners struggling to learn Python for the first time. This feedback mostly owes to Python training classes taught over a period of two decades. While these classes have now gone the way of the dodo and Yahoo, this book takes care to retain its learner-inspired material because that’s much—if not most—of its value.
As a result, if you’re like most of the thousands of learners whose experiences have been captured here, you’ll probably find that this book works like a self-paced version of the Python training sessions from which it arose. You may sometimes even find that it answers your questions before they are asked because a host of learners before you have had the same queries. This isn’t clairvoyance; it simply reflects the fact that learning resources do best when they listen to learners.
It’s also worth noting up front that this book sometimes critiques Python changes while presenting them. Critical thinking is crucial in engineering domains—especially in one caught up in an arms race that convolutes tools used by millions of people. On some levels, Python remains a constantly morphing sandbox of ideas that too often prioritizes changer hubris over user need, and this book is not shy about calling this out. That said, the main goal here is to educate, not criticize, and opinions are always, well, opinionated. Although views here reflect decades of using and teaching Python, you should always judge the net worth of Python changes for yourself in whatever world you’ve been cast.
Changes in the sixth edition:
This edition drops coverage of the now-sunsetted Python 2.X line and updates its content to be current with Python 3.12 and the decade of changes since its prior edition. It also gives more focus to non-Windows platforms, including smartphones. Among its new 3.X content, this edition covers f-string literals, named-assignment expressions, match statements, type hinting, async coroutines, underscore digit separators, exception groups, module attribute hooks, star-unpacking proliferation, main-script package files, dictionary-key insertion order, positional-only function arguments, hash-based bytecode files, and other additions, deprecations, and changes.
Other noteworthy changes this time around:
Table of Contents
Part I. Getting Started
Chapter 1. A Python Q&A Session
Chapter 2. How Python Runs Programs
Chapter 3. How You Run Programs
Part II. Objects and Operations
Chapter 4. Introducing Python Objects
Chapter 5. Numbers and Expressions
Chapter 6. The Dynamic Typing Interlude
Chapter 7. String Fundamentals
Chapter 8. Lists and Dictionaries
Chapter 9. Tuples, Files, and Everything Else
Part III. Statements and Syntax
Chapter 10. Introducing Python Statements
Chapter 11. Assignments, Expressions, and Prints
Chapter 12. if and match Selections
Chapter 13. while and for Loops
Chapter 14. Iterations and Comprehensions
Chapter 15. The Documentation Interlude
Part IV. Functions and Generators
Chapter 16. Function Basics
Chapter 17. Scopes
Chapter 18. Arguments
Chapter 19. Function Odds and Ends
Chapter 20. Comprehensions and Generations
Chapter 21. The Benchmarking Interlude
Part V. Modules and Packages
Chapter 22. Modules: The Big Picture
Chapter 23. Module Coding Basics
Chapter 24. Module Packages
Chapter 25. Module Odds and Ends
Part VI. Classes and OOP
Chapter 26. OOP: The Big Picture
Chapter 27. Class Coding Basics
Chapter 28. A More Realistic Example
Chapter 29. Class Coding Details
Chapter 30. Operator Overloading
Chapter 31. Designing with Classes
Chapter 32. Class Odds and Ends
Part VII. Exceptions
Chapter 33. Exception Basics
Chapter 34. Exception Coding Details
Chapter 35. Exception Objects
Chapter 36. Exception Odds and Ends
Part VIII. Advanced Topics
Chapter 37. Unicode and Byte Strings
Chapter 38. Managed Attributes
Chapter 39. Decorators
Chapter 40. Metaclasses and Inheritance
Chapter 41. All Good Things
Part IX. Appendices
Appendix A. Platform Usage Tips
Appendix B. Solutions to End-of-Part Exercises
About the Author
Mark Lutz is the author of Python's classic and foundational texts, a former trainer with two decades of experience teaching Python to newcomers, and one of the people responsible for the prominence that Python enjoys today.
Mark wrote the three O'Reilly books Learning Python, Programming Python, and Python Pocket Reference, all currently in fourth, fifth, or sixth editions. He has been using and promoting Python since 1992, started writing Python books in 1995, and began teaching Python classes in 1997.
All told, Mark has taught thousands of learners live and in person, and his published works span 12k pages among 15 books that cover Pythons 1.X through 3.X. He also has BS and MS degrees in computer science, work experience in compilers and other domains, and a current interest in Python-coded apps that run on both PCs and phones.









