
Python for Professionals
US$ 19.95
The publisher has enabled DRM protection, which means that you need to use the BookFusion iOS, Android or Web app to read this eBook. This eBook cannot be used outside of the BookFusion platform.
Description
Contents
Reviews
Language
English
ISBN
9789389423754
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
The book hasn't received reviews yet.