
Python: Journey from Novice to Expert
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
All prices
More details
Content
- Cover
- Copyright
- Credits
- Preface
- TOC
- Module 1: Learning Python
- 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
- Summary
- Chapter 3: Iterating and Making Decisions
- Conditional programming
- Looping
- Putting this all together
- A quick peek at the itertools module
- Summary
- 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
- Summary
- 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
- Summary
- Chapter 6: Advanced Concepts - OOP, Decorators, and Iterators
- Decorators
- Object-oriented programming
- Writing a custom iterator
- Summary
- Chapter 7: Testing, Profiling, and Dealing with Exceptions
- Testing your application
- Test-driven development
- Exceptions
- Profiling Python
- Summary
- Chapter 8: The Edges - GUIs and Scripts
- First approach - scripting
- Second approach - a GUI application
- Where do we go from here?
- Summary
- Chapter 9: Data Science
- IPython and Jupyter notebook
- Dealing with data
- Where do we go from here?
- Summary
- 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
- Summary
- Chapter 11: Debugging and Troubleshooting
- Debugging techniques
- Troubleshooting guidelines
- Summary
- Chapter 12: Summing Up - A Complete Example
- The challenge
- Our implementation
- Implementing the Django interface
- Implementing the Falcon API
- Where do you go from here?
- Summary
- A word of farewell
- Module 2: Python 3 Object-Oriented Programming
- Chapter 1: Object-oriented Design
- Introducing object-oriented
- Objects and classes
- Specifying attributes and behaviors
- Hiding details and creating the public interface
- Composition
- Inheritance
- Case study
- Exercises
- Summary
- Chapter 2: Objects in Python
- Creating Python classes
- Modules and packages
- Organizing module contents
- Who can access my data?
- Third-party libraries
- Case study
- Exercises
- Summary
- Chapter 3: When Objects Are Alike
- Basic inheritance
- Multiple inheritance
- Polymorphism
- Abstract base classes
- Case study
- Exercises
- Summary
- Chapter 4: Expecting the Unexpected
- Raising exceptions
- Case study
- Exercises
- Summary
- Chapter 5: When to Use Object-oriented Programming
- Treat objects as objects
- Adding behavior to class data with properties
- Manager objects
- Case study
- Exercises
- Summary
- Chapter 6: Python Data Structures
- Empty objects
- Tuples and named tuples
- Dictionaries
- Lists
- Sets
- Extending built-ins
- Queues
- Case study
- Exercises
- Summary
- Chapter 7: Python Object-oriented Shortcuts
- Python built-in functions
- An alternative to method overloading
- Functions are objects too
- Case study
- Exercises
- Summary
- Chapter 8: Strings and Serialization
- Strings
- Regular expressions
- Serializing objects
- Case study
- Exercises
- Summary
- Chapter 9: The Iterator Pattern
- Design patterns in brief
- Iterators
- Comprehensions
- Generators
- Coroutines
- Case study
- Exercises
- Summary
- Chapter 10: Python Design Patterns I
- The decorator pattern
- The observer pattern
- The strategy pattern
- The state pattern
- The singleton pattern
- The template pattern
- Exercises
- Summary
- Chapter 11: Python Design Patterns II
- The adapter pattern
- The facade pattern
- The flyweight pattern
- The command pattern
- The abstract factory pattern
- The composite pattern
- Exercises
- Summary
- Chapter 12: Testing Object-oriented Programs
- Why test?
- Unit testing
- Testing with py.test
- Imitating expensive objects
- How much testing is enough?
- Case study
- Exercises
- Summary
- Chapter 13: Concurrency
- Threads
- Multiprocessing
- Futures
- AsyncIO
- Case study
- Exercises
- Summary
- Module 3: Mastering Python
- Chapter 1: Getting Started - One Environment per Project
- Creating a virtual Python environment using venv
- Bootstrapping pip using ensurepip
- Installing C/C++ packages
- Summary
- Chapter 2: Pythonic Syntax, Common Pitfalls, and Style Guide
- Code style - or what is Pythonic code?
- Common pitfalls
- Summary
- Chapter 3: Containers and Collections - Storing Data the Right Way
- Time complexity - the big O notation
- Core collections
- Advanced collections
- Summary
- Chapter 4: Functional Programming - Readability Versus Brevity
- Functional programming
- list comprehensions
- dict comprehensions
- set comprehensions
- lambda functions
- functools
- itertools
- Summary
- Chapter 5: Decorators - Enabling Code Reuse by Decorating
- Decorating functions
- Decorating class functions
- Decorating classes
- Useful decorators
- Summary
- Chapter 6: Generators and Coroutines - Infinity, One Step at a Time
- What are generators?
- Coroutines
- Summary
- Chapter 7: Async IO - Multithreading without Threads
- Introducing the asyncio library
- Summary
- Chapter 8: Metaclasses - Making Classes (Not Instances) Smarter
- Dynamically creating classes
- Abstract classes using collections.abc
- Automatically registering a plugin system
- Order of operations when instantiating classes
- Storing class attributes in definition order
- Summary
- Chapter 9: Documentation - How to Use Sphinx and reStructuredText
- The reStructuredText syntax
- The Sphinx documentation generator
- Documenting code
- Summary
- Chapter 10: Testing and Logging - Preparing for Bugs
- Using examples as tests with doctest
- Testing with py.test
- Mock objects
- Logging
- Summary
- Chapter 11: Debugging - Solving the Bugs
- Non-interactive debugging
- Interactive debugging
- Summary
- Chapter 12: Performance - Tracking and Reducing Your Memory and CPU Usage
- What is performance?
- Timeit - comparing code snippet performance
- cProfile - finding the slowest components
- Line profiler
- Improving performance
- Memory usage
- Performance monitoring
- Summary
- Chapter 13: Multiprocessing - When a Single CPU Core Is Not Enough
- Multithreading versus multiprocessing
- Hyper-threading versus physical CPU cores
- Creating a pool of workers
- Sharing data between processes
- Remote processes
- Summary
- Chapter 14: Extensions in C/C++, System Calls, and C/C++ Libraries
- Introduction
- Calling C/C++ with ctypes
- CFFI
- Native C/C++ extensions
- Summary
- Chapter 15: Packaging - Creating Your Own Libraries or Applications
- Installing packages
- Setup parameters
- Packages
- Entry points
- Package data
- Testing packages
- C/C++ extensions
- Wheels - the new eggs
- Summary
- Bibliography
- Blank Page
System requirements
File format: ePUB
Copy protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (not Kindle).
The file format ePub works well for novels and non-fiction books – i.e., „flowing” text without complex layout. On an e-reader or smartphone, line and page breaks automatically adjust to fit the small displays.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our ebook Help page.
File format: PDF
Copy-Protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (only limited: Kindle).
The file format PDF always displays a book page identically on any hardware. This makes PDF suitable for complex layouts such as those used in textbooks and reference books (images, tables, columns, footnotes). Unfortunately, on the small screens of e-readers or smartphones, PDFs are rather annoying, requiring too much scrolling.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our eBook Help page.