Dive Into Python
Автор(ы):
Pilgrim M
Язык: английский Формат файла: pdf Год выхода: 2004 Страниц: 327 Размер: 1.14 MB Скачать Welcome to Python. Let's dive in.ContentsChapter 1. Installing Python1.1. Which Python is right for you? 1.2. Python on Windows 1.3. Python on Mac OS X 1.4. Python on Mac OS 9 1.5. Python on RedHat Linux 1.6. Python on Debian GNU/Linux 1.7. Python Installation from Source 1.8. The Interactive Shell 1.9. Summary Chapter 2. Your First Python Program2.1. Diving in 2.2. Declaring Functions 2.3. Documenting Functions 2.4. Everything Is an Object 2.5. Indenting Code 2.6. Testing Modules Chapter 3. Native Datatypes3.1. Introducing Dictionaries 3.2. Introducing Lists 3.3. Introducing Tuples 3.4. Declaring variables 3.5. Formatting Strings 3.6. Mapping Lists 3.7. Joining Lists and Splitting Strings 3.8. Summary Chapter 4. The Power Of Introspection4.1. Diving In 4.2. Using Optional and Named Arguments 4.3. Using type, str, dir, and Other Built−In Functions 4.4. Getting Object References With getattr 4.5. Filtering Lists 4.6. The Peculiar Nature of and and or 4.7. Using lambda Functions 4.8. Putting It All Together 4.9. Summary Chapter 5. Objects and Object−Orientation5.1. Diving In 5.2. Importing Modules Using from module import .5.3. Defining Classes 5.4. Instantiating Classes 5.5. Exploring UserDict: A Wrapper Class 5.6. Special Class Methods 5.7. Advanced Special Class Methods Chapter 5. Objects and Object−Orientation5.8. Introducing Class Attributes 5.9. Private Functions 5.10. Summary Chapter 6. Exceptions and File Handling6.1. Handling Exceptions 6.2. Working with File Objects 6.3. Iterating with for Loops 6.4. Using sys.modules 6.5. Working with Directories 6.6. Putting It All Together 6.7. Summary Chapter 7. Regular Expressions7.1. Diving In 7.2. Case Study: Street Addresses 7.3. Case Study: Roman Numerals 7.4. Using the {n,m} Syntax 7.5. Verbose Regular Expressions 7.6. Case study: Parsing Phone Numbers 7.7. Summary Chapter 8. HTML Processing8.1. Diving in 8.2. Introducing sgmllib.py 8.3. Extracting data from HTML documents 8.4. Introducing BaseHTMLProcessor.py 8.5. locals and globals 8.6. Dictionary−based string formatting 8.7. Quoting attribute values 8.8. Introducing dialect.py 8.9. Putting it all together 8.10. Summary Chapter 9. XML Processing9.1. Diving in 9.2. Packages. 9.3. Parsing XML 9.4. Unicode 9.5. Searching for elements 9.6. Accessing element attributes 9.7. Segue Chapter 10. Scripts and Streams10.1. Abstracting input sources 10.2. Standard input, output, and error 10.3. Caching node lookups 10.4. Finding direct children of a node 10.5. Creating separate handlers by node type Chapter 10. Scripts and Streams10.6. Handling command−line arguments 10.7. Putting it all together 10.8. Summary Chapter 11. HTTP Web Services11.1. Diving in 11.2. How not to fetch data over HTTP 11.3. Features of HTTP 11.4. Debugging HTTP web services 11.5. Setting the User−Agent 11.6. Handling Last−Modified and ETag 11.7. Handling redirects 11.8. Handling compressed data 11.9. Putting it all together 11.10. Summary Chapter 12. SOAP Web Services12.1. Diving In 12.2. Installing the SOAP Libraries 12.3. First Steps with SOAP 12.4. Debugging SOAP Web Services 12.5. Introducing WSDL 12.6. Introspecting SOAP Web Services with WSDL 12.7. Searching Google 12.8. Troubleshooting SOAP Web Services 12.9. Summary Chapter 13. Unit Testing13.1. Introduction to Roman numerals 13.2. Diving in 13.3. Introducing romantest.py 13.4. Testing for success 13.5. Testing for failure 13.6. Testing for sanity Chapter 14. Test−First Programming14.1. roman.py, stage 1 14.2. roman.py, stage 2 14.3. roman.py, stage 3 14.4. roman.py, stage 4 14.5. roman.py, stage 5 Chapter 15. Refactoring15.1. Handling bugs 15.2. Handling changing requirements 15.3. Refactoring 15.4. Postscript 15.5. Summary Chapter 16. Functional Programming16.1. Diving in 16.2. Finding the path 16.3. Filtering lists revisited 16.4. Mapping lists revisited 16.5. Data−centric programming 16.6. Dynamically importing modules 16.7. Putting it all together 16.8. Summary Chapter 17. Dynamic functions17.1. Diving in 17.2. plural.py, stage 1 17.3. plural.py, stage 2 17.4. plural.py, stage 3 17.5. plural.py, stage 4 17.6. plural.py, stage 5 17.7. plural.py, stage 6 17.8. Summary Chapter 18. Performance Tuning18.1. Diving in 18.2. Using the timeit Module 18.3. Optimizing Regular Expressions 18.4. Optimizing Dictionary Lookups 18.5. Optimizing List Operations 18.6. Optimizing String Manipulation 18.7. Summary Пока комментариев нет
Оставить комментарий |