更新时间:2021-07-30 09:42:12
封面
版权页
Credits
About the Author
Acknowledgements
About the Reviewers
www.PacktPub.com
Support files eBooks discount offers and more
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Chapter 1. Introduction and First Steps – Take a Deep Breath
A proper introduction
Enter the Python
About Python
What are the drawbacks?
Who is using Python today?
Setting up the environment
Installing Python
How you can run a Python program
How is Python code organized
Python's execution model
Guidelines on how to write good code
The Python culture
A note on the IDEs
Summary
Chapter 2. Built-in Data Types
Everything is an object
Mutable or immutable? That is the question
Numbers
Immutable sequences
Mutable sequences
Set types
Mapping types – dictionaries
The collections module
Final considerations
Chapter 3. Iterating and Making Decisions
Conditional programming
Looping
Putting this all together
A quick peek at the itertools module
Chapter 4. Functions the Building Blocks of Code
Why use functions?
Scopes and name resolution
Input parameters
Return values
A few useful tips
Recursive functions
Anonymous functions
Function attributes
Built-in functions
One final example
Documenting your code
Importing objects
Chapter 5. Saving Time and Memory
map zip and filter
Comprehensions
Generators
Some performance considerations
Don't overdo comprehensions and generators
Name localization
Generation behavior in built-ins
One last example
Chapter 6. Advanced Concepts – OOP Decorators and Iterators
Decorators
Object-oriented programming
Writing a custom iterator
Chapter 7. Testing Profiling and Dealing with Exceptions
Testing your application
Test-driven development
Exceptions
Profiling Python
Chapter 8. The Edges – GUIs and Scripts
First approach – scripting
Second approach – a GUI application
Where do we go from here?
Chapter 9. Data Science
IPython and Jupyter notebook
Dealing with data
Chapter 10. Web Development Done Right
What is the Web?
How does the Web work?
The Django web framework
A regex website
The future of web development
Chapter 11. Debugging and Troubleshooting