
Python for Professionals
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
More details
Other editions
Additional editions

Content
- Cover Page
- Title Page
- Copyright Page
- Dedication
- About the Author
- About the Reviewer
- Acknowledgement
- Preface
- Errata
- Table of Contents
- 1. The History and Installation of Python
- Introduction
- Structure
- Objectives
- Python: the language
- History
- Selecting a Python version
- Why not use 2.7?
- Which 3.x to use?
- Installing
- Testing your installation
- The Zen of Python
- Keeping it simple
- Keeping it readable
- Never is better than right now
- Using pip
- Using virtual environments
- Python IDE's and command line work
- Hello world
- Conclusion
- Questions
- 2. Python Types and Constructs
- Introduction
- Structure
- Objectives
- Integers
- Floating point numbers
- Boolean
- Complex values
- Variable naming
- Strings
- Finding substrings
- Multiple line strings
- Concatenating
- Other methods
- Python Collections
- Lists
- Dictionaries
- Getting the value of a key
- Testing if a key is in a dictionary
- Iterating
- Length of a dictionary
- Adding new items
- Nested dictionaries
- Sets
- Tuples
- Iterators and iterables
- Sorted
- The zip function
- Booleans and truthiness
- Comments
- Conclusion
- Questions
- 3. The Nuts and Bolts
- Introduction
- Structure
- Objectives
- Conditionals
- The "walrus" operator
- ANDs, ORs, NOTs, and logicals
- Indentation
- The pass statement
- Loops
- Functions
- Parameters
- Return values
- Required vs optional arguments
- Keyword arguments
- Variable length arguments
- Lambdas
- Classes
- Scoping
- Objects
- Conclusion
- Questions
- 4. Organizational Skills
- Introduction
- Structure
- Objectives
- Immediate mode
- Modules
- Packages
- Importing
- Paths
- Dot notation in naming
- Installing packages using pip
- Insuring requirements with pip
- User installs vs system installs
- Conclusion
- Questions
- 5. Object-Oriented Programming
- Introduction
- Structure
- Objective
- Object-oriented programming with Python
- Abstraction
- Encapsulation
- Inheritance
- Multiple inheritance
- Polymorphism, the Python way
- Overloading of methods
- Overloading of operators
- Comparisons and overloading
- Read-only attributes
- The __new__operator
- Classes and Iteratables
- Chaining of operations
- Initialization
- Conclusion
- Questions
- 6. Advanced Manipulations
- Introduction
- Structure
- Objectives
- List comprehensions
- Dictionary comprehensions
- Nested dictionary comprehensions
- Applying functions
- Restrictions on dictionary comprehensions
- Set comprehensions
- Generators
- Building a string from a list
- Searching a string
- Searching a collection
- Using a set of functions to create an extensible state machine
- Filtering vs removing
- Slicing
- Lambda expressions
- The 'splat' operator and unpacking
- Conclusion
- Questions
- 7. File Input and Output
- Introduction
- Structure
- Objectives
- Files
- Working with files
- Using the with statement
- Reading fixed length data from files in Python
- Reading a text file by lines in Python
- A readlines real-world example
- Python and binary files
- JSON parsing
- JSON writing
- Serializing complex objects in JSON
- Reading in text vs reading in lines
- Writing out lines
- Output formatting
- Pickling
- Conclusion
- Questions
- 8. Imports and Reuse
- Introduction
- Structure
- Objectives
- Import and reuse of code
- Importing
- Importing modules
- Importing packages
- Dynamic imports
- Working with the os module
- Directory and file information
- Listing installed packages
- Reflection
- Using Reflection
- Conclusion
- Questions
- 9. Miscellaneous
- Introduction
- Structure
- Objectives
- Decorators
- Variable arguments
- Character encoding
- Properties
- Description strings
- Namespaces
- Context managers
- Metaclasses
- Dynamic classes and functions
- Deep vs shallow copying
- Exception handling
- Conclusion
- Questions
- 10. Not Reinventing the Wheel
- Introduction
- Structure
- Objectives
- Not reinventing the wheel
- Itertools
- Flask
- Adding authentication
- Numpy
- Installing Numpy
- Getting started: The basic array
- Accessing Numpy Data
- Data types
- Modifying arrays with Numpy
- Numpy mathematical functions
- Logging
- Unit test
- Setup and teardown
- Mocking
- Concurrency
- The emoji package
- The pprint package
- The requests package
- Conclusion
- Questions
- 11. General Tips and Tricks
- Introduction
- Structure
- Objectives
- Implementing a switch statement with dictionaries
- Remove duplicates from a list
- Determine the size of your objects in memory
- Find the most frequent item in a list
- Creating an enum in a class
- Detect Python version
- Using the _ (underscore) operator
- Discovering where a module is imported from
- Swapping two values without an intermediate temporary
- Using the classmethod decorator to create static methods
- Using the **kwargs to pass a named list of parameters
- Type hints
- Finding the day of the week using the calendar module
- Working with regular expressions
- Conclusion
- Questions
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.