وبلاگ بلیان

Dive into Python

معرفی کتاب «Dive into Python» نوشتهٔ Pilgrim M.، منتشرشده توسط نشر draft در سال 2002. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است. «Dive into Python» در دستهٔ بدون دسته‌بندی قرار دارد.

Table of Contents......Page 1 Dive Into Python......Page 4 Preface......Page 5 1.2. Declaring functions......Page 6 1.3. Documenting functions......Page 7 1.4. Everything is an object......Page 8 1.6. Testing modules......Page 10 1.7. Introducing dictionaries......Page 11 1.8. Introducing lists......Page 13 1.9. Introducing tuples......Page 17 1.10. Defining variables......Page 18 1.11. Assigning multiple values at once......Page 19 1.12. Formatting strings......Page 20 1.13. Mapping lists......Page 21 1.14. Joining lists and splitting strings......Page 23 1.15. Summary......Page 24 2.1. Diving in......Page 26 2.2. Optional and named arguments......Page 27 2.3. type, str, dir, and other built-in functions......Page 28 2.4. Getting object references with getattr......Page 31 2.5. Filtering lists......Page 32 2.6. The peculiar nature of and and or......Page 33 2.7. Using lambda functions......Page 35 2.8. Putting it all together......Page 37 2.9. Summary......Page 39 3.1. Diving in......Page 41 3.2. Importing modules using from module import......Page 43 3.3. Defining classes......Page 44 3.4. Instantiating classes......Page 47 3.5. UserDict: a wrapper class......Page 48 3.6. Special class methods......Page 50 3.7. Advanced special class methods......Page 53 3.8. Class attributes......Page 54 3.9. Private functions......Page 55 3.10. Handling exceptions......Page 56 3.11. File objects......Page 59 3.12. for loops......Page 61 3.13. More on modules......Page 63 3.14. The os module......Page 65 3.15. Putting it all together......Page 67 3.16. Summary......Page 68 4.1. Diving in......Page 71 4.2. Introducing sgmllib.py......Page 75 4.3. Extracting data from HTML documents......Page 77 4.4. Introducing BaseHTMLProcessor.py......Page 79 4.5. locals and globals......Page 81 4.6. Dictionary-based string formatting......Page 84 4.7. Quoting attribute values......Page 85 4.8. Introducing dialect.py......Page 86 4.9. Regular expressions 101......Page 88 4.10. Putting it all together......Page 90 4.11. Summary......Page 92 5.1. Diving in......Page 94 5.2. Packages......Page 100 5.3. Parsing XML......Page 102 5.4. Unicode......Page 104 5.5. Searching for elements......Page 108 5.6. Accessing element attributes......Page 109 5.7. Abstracting input sources......Page 111 5.8. Standard input, output, and error......Page 114 5.9. Caching node lookups......Page 117 5.10. Finding direct children of a node......Page 118 5.11. Creating separate handlers by node type......Page 119 5.12. Handling command line arguments......Page 120 5.13. Putting it all together......Page 124 5.14. Summary......Page 125 6.1. Diving in......Page 127 6.2. Introducing romantest.py......Page 128 6.3. Testing for success......Page 131 6.4. Testing for failure......Page 133 6.5. Testing for sanity......Page 135 6.6. roman.py, stage 1......Page 136 6.7. roman.py, stage 2......Page 139 6.8. roman.py, stage 3......Page 143 6.9. roman.py, stage 4......Page 146 6.10. roman.py, stage 5......Page 148 6.11. Handling bugs......Page 152 6.12. Handling changing requirements......Page 154 6.13. Refactoring......Page 160 6.14. Postscript......Page 163 6.15. Summary......Page 165 7.1. Diving in......Page 167 7.2. Finding the path......Page 168 7.3. Filtering lists revisited......Page 170 7.4. Mapping lists revisited......Page 172 7.5. Data-centric programming......Page 173 7.6. Dynamically importing modules......Page 174 Appendix A. Further reading......Page 175 Appendix B. A 5-minute review......Page 179 Appendix C. Tips and tricks......Page 188 Appendix D. List of examples......Page 196 Appendix E. Revision history......Page 204 Appendix F. About the book......Page 212 G.1. Applicability and definitions......Page 213 G.3. Copying in quantity......Page 214 G.4. Modifications......Page 215 G.8. Translation......Page 216 G.11. How to use this License for your documents......Page 217 H.B. Terms and conditions for accessing or otherwise using Python......Page 218 Table of Contents 1 Dive Into Python 4 Preface 5 Chapter 1. Getting To Know Python 6 1.1. Diving in 6 1.2. Declaring functions 6 1.3. Documenting functions 7 1.4. Everything is an object 8 1.5. Indenting code 10 1.6. Testing modules 10 1.7. Introducing dictionaries 11 1.8. Introducing lists 13 1.9. Introducing tuples 17 1.10. Defining variables 18 1.11. Assigning multiple values at once 19 1.12. Formatting strings 20 1.13. Mapping lists 21 1.14. Joining lists and splitting strings 23 1.15. Summary 24 Chapter 2. The Power Of Introspection 26 2.1. Diving in 26 2.2. Optional and named arguments 27 2.3. type, str, dir, and other built-in functions 28 2.4. Getting object references with getattr 31 2.5. Filtering lists 32 2.6. The peculiar nature of and and or 33 2.7. Using lambda functions 35 2.8. Putting it all together 37 2.9. Summary 39 Chapter 3. An Object-Oriented Framework 41 3.1. Diving in 41 3.2. Importing modules using from module import 43 3.3. Defining classes 44 3.4. Instantiating classes 47 3.5. UserDict: a wrapper class 48 3.6. Special class methods 50 3.7. Advanced special class methods 53 3.8. Class attributes 54 3.9. Private functions 55 3.10. Handling exceptions 56 3.11. File objects 59 3.12. for loops 61 3.13. More on modules 63 3.14. The os module 65 3.15. Putting it all together 67 3.16. Summary 68 Chapter 4. HTML Processing 71 4.1. Diving in 71 4.2. Introducing sgmllib.py 75 4.3. Extracting data from HTML documents 77 4.4. Introducing BaseHTMLProcessor.py 79 4.5. locals and globals 81 4.6. Dictionary-based string formatting 84 4.7. Quoting attribute values 85 4.8. Introducing dialect.py 86 4.9. Regular expressions 101 88 4.10. Putting it all together 90 4.11. Summary 92 Chapter 5. XML Processing 94 5.1. Diving in 94 5.2. Packages 100 5.3. Parsing XML 102 5.4. Unicode 104 5.5. Searching for elements 108 5.6. Accessing element attributes 109 5.7. Abstracting input sources 111 5.8. Standard input, output, and error 114 5.9. Caching node lookups 117 5.10. Finding direct children of a node 118 5.11. Creating separate handlers by node type 119 5.12. Handling command line arguments 120 5.13. Putting it all together 124 5.14. Summary 125 Chapter 6. Unit Testing 127 6.1. Diving in 127 6.2. Introducing romantest.py 128 6.3. Testing for success 131 6.4. Testing for failure 133 6.5. Testing for sanity 135 6.6. roman.py, stage 1 136 6.7. roman.py, stage 2 139 6.8. roman.py, stage 3 143 6.9. roman.py, stage 4 146 6.10. roman.py, stage 5 148 6.11. Handling bugs 152 6.12. Handling changing requirements 154 6.13. Refactoring 160 6.14. Postscript 163 6.15. Summary 165 Chapter 7. Data-Centric Programming 167 7.1. Diving in 167 7.2. Finding the path 168 7.3. Filtering lists revisited 170 7.4. Mapping lists revisited 172 7.5. Data-centric programming 173 7.6. Dynamically importing modules 174 Appendix A. Further reading 175 Appendix B. A 5-minute review 179 Appendix C. Tips and tricks 188 Appendix D. List of examples 196 Appendix E. Revision history 204 Appendix F. About the book 212 Appendix G. GNU Free Documentation License 213 G.0. Preamble 213 G.1. Applicability and definitions 213 G.2. Verbatim copying 214 G.3. Copying in quantity 214 G.4. Modifications 215 G.5. Combining documents 216 G.6. Collections of documents 216 G.7. Aggregation with independent works 216 G.8. Translation 216 G.9. Termination 217 G.10. Future revisions of this license 217 G.11. How to use this License for your documents 217 Appendix H. Python 2.1.1 license 218 H.A. History of the software 218 H.B. Terms and conditions for accessing or otherwise using Python 218 Python,Dive Into Python,tutorial,object-oriented,programming,documentation,book,free
دانلود کتاب Dive into Python