Download Intermediate Python PDF

TitleIntermediate Python
File Size20.8 MB
Total Pages174
Table of Contents
                            Table of Contents
Acknowledgements
An Introduction
	The Evolution of Python
	Python 2 vs Python 3
	The Python Programming Language
A Very Short Tutorial
	Using Python
	Python Statements, Line Structure and Indentation
	Strings
	Flow Control
	Functions
	Data Structures
	Classes
	Modules
	Exceptions
	Input and Output
	Getting Help
Intermezzo: Glossary
	Names and Binding
	Code Blocks
	Name-spaces
	Scopes
	eval()
	exec()
Objects 201
	Strong and Weak Object References
	The Type Hierarchy
		None Type
		NotImplemented Type
		Ellipsis Type
		Numeric Type
		Sequence Type
		Set
		Mapping
		Callable Types
		Custom Type
		Module Type
		File/IO Types
		Built-in Types
Object Oriented Programming
	The Mechanics of Class Definitions
		Class Objects
		Instance Objects
		Method Objects
	Customizing User-defined Types
		Special methods for Type Emulation
		Special Methods for comparing objects
		Special Methods and Attributes for Miscellaneous Customizations
	A Vector class
	Inheritance
		The super keyword
		Multiple Inheritance
	Static and Class Methods
		Static Methods
		Class Methods
	Descriptors and Properties
		Enter Python Descriptors
		Class Properties
	Abstract Base Classes
The Function
	Function Definitions
	Functions are Objects
	Functions are descriptors
	Calling Functions
		Unpacking Function Argument
		* and ** Function Parameters
	Nested functions and Closures
	A Byte of Functional Programming
		The Basics
		Comprehensions
		Functools
		Sequences and Functional Programming
Iterators and Generators
	Iterators
		The Itertools Module
	Generators
		Generator Functions
		Generator Expressions
		The Beauty of Generators and Iterators
	From Generators To Coroutines
		Simulating Multitasking with Coroutines
	The yield from keyword
	A Game of Life
MetaProgramming and Co.
	Decorators
		Function Decorators
		Decorators in Python
		Passing Arguments To Decorated Functions
		Decorator Functions with Arguments
		Functools.wrap
		Class Decorators
	Decorator Recipes
	Metaclasses
		Metaclasses in Action
		Overriding __new__ vs __init__ in Custom Metaclasses
	Context Managers
		The Contextlib module
Modules And Packages
	Modules
		Reloading Modules
	How are Modules found?
	Packages
		Regular Packages
		Namespace Packages
	The Import System
		The Import Search Process
		Why You Probably Should Not Reload Modules…
	Distributing Python Programs
Inspecting Objects
	Handling source code
	Inspecting Classes and Functions
	Interacting with Interpreter Stacks
The Zen of Python …
                        
Document Text Contents
Page 2

Intermediate Python

Obi Ike-Nwosu

This book is for sale at http://leanpub.com/intermediatepython

This version was published on 2015-10-18

This is a Leanpub book. Leanpub empowers authors and publishers with the Lean Publishing
process. Lean Publishing is the act of publishing an in-progress ebook using lightweight tools and
many iterations to get reader feedback, pivot until you have the right book and build traction once
you do.

©2015 Obi Ike-Nwosu

http://leanpub.com/intermediatepython
http://leanpub.com

Similer Documents