Index
A
- abc.ABC class
- using / Using abc.ABC before Python 3.4
- ABI
- or API, selecting between / ABI or API?
- abstract classes
- collections.abc, using / Abstract classes using collections.abc
- usage / Internal workings of the abstract classes
- custom type checks, performing / Custom type checks
- abc.ABC class, using / Using abc.ABC before Python 3.4
- Abstract Syntax Tree (AST)
- about / McCabe
- accumulate function
- addition
- versus generators / Addition versus generators
- advanced collections
- about / Advanced collections
- ChainMap / ChainMap – the list of dictionaries, counter – keeping track of the most occurring elements
- deque / deque – the double ended queue
- defaultdict / defaultdict – dictionary with a default value
- namedtuple / namedtuple – tuples with field names
- enum / enum – a group of constants
- OrderedDict / OrderedDict – a dictionary where the insertion order matters
- heapq / heapq – the ordered list
- bisect / bisect – the sorted list
- arrays
- assertions
- simplifying / Simplifying assertions
- asynchronous clients
- about / Asynchronous servers and clients
- asynchronous servers
- about / Asynchronous servers and clients
- basic echo server / Basic echo server
- asyncio.coroutine decorator
- asyncio.get_event_loop event loop
- asyncio.sleep function
- asyncio.wait function
- asyncio library
- about / Introducing the asyncio library
- async statement / The async and await statements
- await statement / The async and await statements
- using, in Python 3.4 / Python 3.4
- using, in Python 3.5 / Python 3.5
- single-threaded parallel processing, example / A simple example of single-threaded parallel processing
- basic concepts / Concepts of asyncio
- coroutines / Concepts of asyncio
- event loops / Concepts of asyncio, Event loops
- futures / Futures and tasks
- tasks / Futures and tasks
- processes / Processes
- asynchronous servers / Asynchronous servers and clients
- asynchronous clients / Asynchronous servers and clients
- debugging / Debugging asyncio
- async statement
- about / The async and await statements
- automatically registering plugin system
- about / Automatically registering a plugin system
- plugins, importing on-demand / Importing plugins on-demand
- plugins, importing through configuration / Importing plugins through configuration
- plugins, importing through file system / Importing plugins through the file system
- automatic arguments
- with fixtures / Automatic arguments using fixtures
- await statement
- about / The async and await statements
B
- basic echo server
- about / Basic echo server
- basic metaclass
- about / A basic metaclass
- bidirectional pipelines
- using / Bidirectional pipelines
- big O notation
- bisect
- about / bisect – the sorted list
- breakpoints
- using / Breakpoints
- bulleted list
- about / Bulleted list
C
- C
- code, converting to / Converting parts of your code to C
- C/C++
- calling, with ctypes / Calling C/C++ with ctypes
- C/C++ extensions
- about / C/C++ extensions
- build command / C/C++ extensions
- clean command / C/C++ extensions
- Regular Extensions / Regular extensions
- Cython Extensions / Cython extensions
- C/C++ modules
- need for / Do you need C/C++ modules?
- C/C++ packages
- installing / Installing C/C++ packages
- installing, on Debian / Debian and Ubuntu
- installing, on Ubuntu / Debian and Ubuntu
- installing, on Red Hat / Red Hat, CentOS, and Fedora
- installing, on CentOS / Red Hat, CentOS, and Fedora
- installing, on Fedora / Red Hat, CentOS, and Fedora
- installing, on OS X / OS X
- installing, on Windows / Windows
- cache fixture
- about / Cache
- caching
- about / Caching
- call stack
- displaying, without exceptions / Showing call stack without exceptions
- CentOS
- C/C++ packages, installing / Red Hat, CentOS, and Fedora
- C Foreign Function Interface (CFFI)
- about / CFFI
- complex data structures / Complex data structures
- arrays, declaring / Arrays
- ABI or API, selecting between / ABI or API?
- versus ctypes / CFFI or ctypes?
- chain function
- ChainMap
- circular imports
- about / Circular imports
- class
- documenting, with Sphinx style / Documenting a class with the Sphinx style
- documenting, with Google style / Documenting a class with the Google style
- documenting, with NumPy style / Documenting a class with the NumPy style
- class attributes
- storing, in definition order / Storing class attributes in definition order
- storing, without metaclasses / The classic solution without metaclasses
- metaclasses, using to obtain sorted namespace / Using metaclasses to get a sorted namespace
- class body
- executing / Executing the class body
- class decorators
- executing / Executing the class decorators
- classes
- used, for creating decorators / Creating decorators using classes
- decorating / Decorating classes
- singletons / Singletons – classes with a single instance
- total ordering class decorator / Total ordering – sortable classes the easy way
- creating, dynamically / Dynamically creating classes
- basic metaclass / A basic metaclass
- metaclasses, arguments / Arguments to metaclasses
- metaclass attributes, accessing / Accessing metaclass attributes through classes
- class functions
- decorating / Decorating class functions
- classmethod decorator, versus staticmethod decorator / Skipping the instance – classmethod and staticmethod
- property decorator / Properties – smart descriptor usage
- class instance
- creating / Creating the class instance
- class instantiation, operations
- about / Order of operations when instantiating classes
- metaclass, searching / Finding the metaclass
- namespace, preparing / Preparing the namespace
- class body, executing / Executing the class body
- class object, creating / Creating the class object (not instance)
- class decorators, executing / Executing the class decorators
- class instance, creating / Creating the class instance
- example / Example
- classmethod decorator
- versus staticmethod decorator / Skipping the instance – classmethod and staticmethod
- class object
- creating / Creating the class object (not instance)
- closures
- code documentation
- about / Documenting code
- class, documenting with Sphinx style / Documenting a class with the Sphinx style
- class, documenting with Google style / Documenting a class with the Google style
- class, documenting with NumPy style / Documenting a class with the NumPy style
- code quality
- verifying / Verifying code quality, pep8, pyflakes, and more
- verifying, with flake8 tool / flake8
- verifying, with pylint / Pylint
- code style
- Pythonic code / Code style – or what is Pythonic code?
- collections.abc
- collections recreation
- versus items removal / Recreating collections versus removing items
- combinations function
- combinations_with_repetitions function
- commands command
- about / Commands
- complex data structures
- creating, with ctypes / Complex data structures
- creating, with C Foreign Function Interface (CFFI) / Complex data structures
- compress function
- configuration, logging module
- basic logging configuration / Basic logging configuration
- dictionary configuration / Dictionary configuration
- JSON configuration / JSON configuration
- Ini file configuration / Ini file configuration
- network configuration / The network configuration
- console
- for interactive debugging / Console on demand
- contextmanager class
- context managers
- about / Context managers
- core collections
- about / Core collections
- list / list – a mutable list of items
- dict / dict – unsorted but a fast map of items
- set / set – like a dict without values
- tuple / tuple – the immutable list
- coroutines
- about / Coroutines
- example / A basic example
- priming / Priming
- closing / Closing and throwing exceptions
- exceptions, throwing / Closing and throwing exceptions
- bidirectional pipelines / Bidirectional pipelines
- state, using / Using the state
- count function
- cProfile
- about / cProfile – finding the slowest components
- executing / First profiling run
- profiler, calibrating / Calibrating your profiler
- selective profiling, with decorators / Selective profiling using decorators
- profile statistics, using / Using profile statistics
- ctypes
- used, for calling C/C++ / Calling C/C++ with ctypes
- platform-specific libraries / Platform-specific libraries
- used, for calling functions / Calling functions and native types
- used, for calling native types / Calling functions and native types
- used, for creating complex data structures / Complex data structures
- used, for declaring arrays / Arrays
- memory management issues / Gotchas with memory management
- versus C Foreign Function Interface (CFFI) / CFFI or ctypes?
- custom fixtures
- about / Custom fixtures
- custom setup.py commands
- writing / Custom setup.py commands
- Cython Extensions
- about / Cython extensions
D
- data sharing
- between processes / Sharing data between processes
- Debian
- C/C++ packages, installing / Debian and Ubuntu
- debuggers
- pudb / Other debuggers
- rpdb2 / Other debuggers
- Werkzeug / Other debuggers
- debugging
- non-interactive debugging / Non-interactive debugging
- interactive debugging / Interactive debugging
- debugging services
- about / Debugging services
- decorators
- used, for decorating functions / Decorating functions
- functools.wraps, using / Why functools.wraps is important
- use cases / How are decorators useful?
- used, for memoization / Memoization using decorators
- with (optional) arguments / Decorators with (optional) arguments
- creating, classes used / Creating decorators using classes
- useful decorators / Useful decorators
- used, for selective profiling / Selective profiling using decorators
- defaultdict
- definition list
- about / Definition list
- deque
- about / deque – the double ended queue
- dict
- dict comprehensions
- about / dict comprehensions
- dictionaries
- testing / Testing dictionaries
- distributed processing
- with multiprocessing / Distributed processing using multiprocessing
- with IPyparallel / Distributed processing using IPyparallel
- distutils package
- about / Setup parameters
- Django-Statsd
- URL / Performance monitoring
- doctest flags
- about / The doctest flags
- True and False, versus 1 and 0 / True and False versus 1 and 0
- whitespace, normalizing / Normalizing whitespace
- ELLIPSIS flag / Ellipsis
- doctest module
- using / Using examples as tests with doctest
- doctest example / A simple doctest example
- doctests, writing / Writing doctests
- testing, with documentation / Testing with pure documentation
- doctest flags / The doctest flags
- doctest quirks / Doctest quirks
- doctest quirks
- about / Doctest quirks
- dictionaries, testing / Testing dictionaries
- floating-point numbers, testing / Testing floating-point numbers
- durations, setting / Times and durations
- times, setting / Times and durations
- docutils library
- Dowser
- about / Tracemalloc
- dropwhile function
- duck typing
- about / Duck typing
E
- .egg files
- about / Wheels – the new eggs
- eggs decorator
- about / Decorating functions
- ELLIPSIS flag
- about / Ellipsis
- end of file (eof)
- about / Processes
- ensurepip
- used, for bootstrapping pip / Bootstrapping pip using ensurepip
- usage / ensurepip usage
- entry points
- about / Entry points
- global commands, creating / Creating global commands
- custom setup.py commands, writing / Custom setup.py commands
- enum
- about / enum – a group of constants
- enumerated list
- about / Enumerated list
- event loops
- about / Event loops
- implementation / Event loop implementations
- policies / Event loop policies
- usage / Event loop usage
- call_soon / Event loop usage
- call_soon_threadsafe / Event loop usage
- call_later / Event loop usage
- call_at / Event loop usage
- exceptions catching
- in Python 2, versus Python 3 / Catching exceptions – differences between Python 2 and 3
- about / Catching exceptions
- ExitStack
- about / Context managers
- reference link / Context managers
- extra built-ins
- creating / Overwriting and/or creating extra built-ins
- overwriting / Overwriting and/or creating extra built-ins
F
- factorial function
- implementing / Implementing a factorial function
- faulthandler
- used, for handling crashes / Handling crashes using faulthandler
- Fedora
- C/C++ packages, installing / Red Hat, CentOS, and Fedora
- fixtures
- used, for automatic arguments / Automatic arguments using fixtures
- cache fixture / Cache
- custom fixtures / Custom fixtures
- flake8 tool
- floating-point numbers
- testing / Testing floating-point numbers
- functional programming
- about / Functional programming
- functions
- decorating, with decorators / Decorating functions
- calling, with ctypes / Calling functions and native types
- functools.wraps
- using / Why functools.wraps is important
- functools library
- about / functools
- partial function / partial – no need to repeat all arguments every time
- reduce function / reduce – combining pairs into a single result
- futures
- about / Futures and tasks
G
- generators
- about / What are generators?
- example / What are generators?
- advantages / Advantages and disadvantages of generators
- disadvantages / Advantages and disadvantages of generators
- usage / Advantages and disadvantages of generators
- pipelines / Pipelines – an effective use of generators
- tee / tee – using an output multiple times
- generating, from generators / Generating from generators
- context managers / Context managers
- versus lists / Lists versus generators, Generators versus lists
- versus addition / Addition versus generators
- versus map and list comprehensions / Map versus generators and list comprehensions
- get-pip.py file
- URL / Manual pip install
- global commands
- creating / Creating global commands
- global interpreter lock (GIL)
- about / Global interpreter lock
- glob module
- URL / Package data
- Google style
- class, documenting / Documenting a class with the Google style
- selecting / Which style to choose
- groupby function
H
- headers, reStructuredText syntax
- about / Headers
- heapq
- about / heapq – the ordered list
- Heapy
- about / Tracemalloc
- Homebrew
- URL / OS X
- Homebrew package manager
- URL / OS X
- hyper-threading
- versus physical CPU cores / Hyper-threading versus physical CPU cores
I
- identity comparison
- versus value comparison / Differences between value and identity comparisons
- if statement
- versus try/except / Try versus if
- image directive
- URL / Images
- images, reStructuredText syntax
- about / Images
- import collisions
- about / Import collisions
- inline markup
- about / Inline markup
- interactive debugging
- about / Interactive debugging
- with console / Console on demand
- with pdb / Debugging using pdb
- with ipdb / Debugging using ipdb
- with other debuggers / Other debuggers
- debugging services / Debugging services
- ipcluster_config.py file
- about / ipcluster_config.py
- ipcontroller_config.py file
- about / ipcontroller_config.py
- ipdb
- used, for interactive debugging / Debugging using ipdb
- ipengine_config.py file
- about / ipengine_config.py
- IPyparallel
- used, for distributed processing / Distributed processing using IPyparallel
- ipython_config.py file / ipython_config.py
- ipython_kernel_config.py file / ipython_kernel_config.py
- ipcontroller_config.py file / ipcontroller_config.py
- ipengine_config.py file / ipengine_config.py
- ipcluster_config.py file / ipcluster_config.py
- IPython
- ipython_config.py file
- about / ipython_config.py
- ipython_kernel_config.py file
- about / ipython_kernel_config.py
- islice function
- about / islice – slicing any iterable
- is operator
- items removal
- versus collections recreation / Recreating collections versus removing items
- itertools library
- about / itertools
- accumulate function / accumulate – reduce with intermediate results
- chain function / chain – combining multiple results
- combinations function / combinations – combinatorics in Python
- permutations function / permutations – combinations where the order matters
- compress function / compress – selecting items using a list of Booleans
- dropwhile function / dropwhile/takewhile – selecting items using a function
- takewhile function / dropwhile/takewhile – selecting items using a function
- count function / count – infinite range with decimal steps
- groupby function / groupby – grouping your sorted iterable
- islice function / islice – slicing any iterable
J
- just-in-time (JIT) compiling
- about / Just-in-time compiling
L
- labels, reStructuredText syntax
- about / Links, references, and labels
- lambda functions
- about / lambda functions
- Y combinator / The Y combinator
- lazy imports
- about / Lazy imports
- line profiler
- about / Line profiler
- links, reStructuredText syntax
- about / Links, references, and labels
- Linux/Unix
- Python interpreter / Linux/Unix
- platform-specific libraries / Linux/Unix
- list
- about / list – a mutable list of items
- list comprehensions
- about / list comprehensions
- versus map and generators / Map versus generators and list comprehensions
- lists
- versus generators / Lists versus generators, Generators versus lists
- lists, reStructuredText syntax
- about / Lists
- enumerated list / Enumerated list
- bulleted list / Bulleted list
- option list / Option list
- definition list / Definition list
- nested lists / Nested lists
- Logger object
- Logger object, properties
- logging
- about / Print statements and logging
- logging module
- about / Logging
- configuration / Configuration
- Logger object / Logger
- used, for debugging / Debugging using logging
- logging module, objects
- loops, PEP8
- about / Loops
M
- MANIFEST.in file
- include/exclude command / Package data
- recursive-include/recursive-exclude command / Package data
- global-include/global-exclude command / Package data
- map
- versus generators and list comprehensions / Map versus generators and list comprehensions
- Markdown
- about / The reStructuredText syntax
- McCabe
- about / McCabe
- memoization
- with decorators / Memoization using decorators
- memory leaks
- monitoring / Memory leaks
- memory management issues
- about / Gotchas with memory management
- memory profiler
- used, for monitoring memory usage / Memory profiler
- memory usage
- about / Memory usage
- monitoring, with tracemalloc / Tracemalloc
- monitoring, with memory profiler / Memory profiler
- reducing / Reducing memory usage
- generators, versus lists / Generators versus lists
- collections recreation, versus items removal / Recreating collections versus removing items
- slots, using / Using slots
- metaclass attributes
- accessing, through classes / Accessing metaclass attributes through classes
- metaclasses
- arguments / Arguments to metaclasses
- searching / Finding the metaclass
- class attributes, storing without / The classic solution without metaclasses
- used, for obtaining sorted namespace / Using metaclasses to get a sorted namespace
- mock objects
- about / Mock objects
- unittest.mock, using / Using unittest.mock
- py.test monkeypatch, using / Using py.test monkeypatch
- multiprocessing
- versus multithreading / Multithreading versus multiprocessing
- used, for distributed processing / Distributed processing using multiprocessing
- multithreading
- versus multiprocessing / Multithreading versus multiprocessing
- mutual exclusion lock (mutex)
- about / Global interpreter lock
N
- namedtuple
- namespace
- preparing / Preparing the namespace
- native C/C++ extensions
- about / Native C/C++ extensions
- example / A basic example
- big number support / C is not Python – size matters
- Python function, calling / Calling Python from C – handling complex types
- native C/C++ extensions, example
- sum_of_squares function, using / The example explained
- static function, declaring / static
- PyObject*, using / PyObject*
- arguments, parsing / Parsing arguments
- error handling / C is not Python – errors are silent or lethal
- native types
- calling, with ctypes / Calling functions and native types
- nested lists
- about / Nested lists
- non-interactive debugging
- about / Non-interactive debugging
- script, inspecting with trace module / Inspecting your script using trace
- with logging module / Debugging using logging
- call stack, displaying without exceptions / Showing call stack without exceptions
- asyncio library, debugging / Debugging asyncio
- crashes, handling with faulthandler / Handling crashes using faulthandler
- nosetests
- used, for testing packages / Nosetests
- NumPy style
- class, documenting / Documenting a class with the NumPy style
- selecting / Which style to choose
O
- optimized libraries
- using / Using optimized libraries
- option list
- about / Option list
- OrderedDict
- OS X
P
- package data
- including / Package data
- packages
- installing / Installing packages
- using / Packages
- testing / Testing packages
- testing, with unittest / Unittest
- testing, with py.test / py.test
- testing, with nosetests / Nosetests
- Pandoc tool
- about / The reStructuredText syntax
- URL / The reStructuredText syntax
- parameters
- setting up / Setup parameters
- partial function
- pdb
- used, for interactive debugging / Debugging using pdb
- breakpoints, using / Breakpoints
- exceptions, catching / Catching exceptions
- commands command, using / Commands
- pdb, commands
- h(elp) / Debugging using pdb
- h(elp) command / Debugging using pdb
- w(here) / Debugging using pdb
- d(own) / Debugging using pdb
- u(p) / Debugging using pdb
- s(tep) / Debugging using pdb
- n(ext) / Debugging using pdb
- r(eturn) / Debugging using pdb
- c(ont(inue)) / Debugging using pdb
- l(ist) [first[, last]] / Debugging using pdb
- ll | longlist / Debugging using pdb
- source expression / Debugging using pdb
- a(rgs) / Debugging using pdb
- pp expression / Debugging using pdb
- b(reak) / Debugging using pdb
- b(reak) [filename*]lineno / Debugging using pdb
- b(reak) function[, condition] / Debugging using pdb
- cl(ear) [filename*]lineno / Debugging using pdb
- cl(ear) breakpoint [breakpoint ...] / Debugging using pdb
- Command / Debugging using pdb
- command breakpoint / Debugging using pdb
- Alias / Debugging using pdb
- alias name command / Debugging using pdb
- unalias name / Debugging using pdb
- ! statement / Debugging using pdb
- Interact / Debugging using pdb
- pdbpp
- about / Other debuggers
- PEP 0405
- pep8
- about / Pep8
- PEP8
- about / Explaining PEP8
- duck typing / Duck typing
- value comparison, versus identity comparison / Differences between value and identity comparisons
- loops / Loops
- maximum line length / Maximum line length
- PEP20
- about / PEP20, the Zen of Python
- code beautification / Beautiful is better than ugly
- explicit code, using / Explicit is better than implicit
- complexity, avoiding / Simple is better than complex
- nested code, avoiding / Flat is better than nested
- whitespace, using / Sparse is better than dense
- readability / Readability counts
- rules, following / Practicality beats purity
- error handling / Errors should never pass silently
- ambiguity, avoiding / In the face of ambiguity, refuse the temptation to guess
- one solution / One obvious way to do it
- problem, fixing / Now is better than never
- complicated code, avoiding / Hard to explain, easy to explain
- namespaces, using / Namespaces are one honking great idea
- conclusion / Conclusion
- performance
- about / What is performance?
- monitoring / Performance monitoring
- performance optimization
- about / Improving performance
- right algorithm, using / Using the right algorithm
- global interpreter lock (GIL) / Global interpreter lock
- try/except, versus if statement / Try versus if
- lists, versus generators / Lists versus generators
- string concatenation / String concatenation
- addition, versus generators / Addition versus generators
- map, versus generators and list comprehensions / Map versus generators and list comprehensions
- caching / Caching
- lazy imports / Lazy imports
- optimized libraries, using / Using optimized libraries
- just-in-time (JIT) compiling / Just-in-time compiling
- code converting, to C / Converting parts of your code to C
- permutations function
- physical CPU cores
- versus hyper-threading / Hyper-threading versus physical CPU cores
- pip
- bootstrapping, ensurepip used / Bootstrapping pip using ensurepip
- manual installation / Manual pip install
- pipelines
- platform-specific libraries
- about / Platform-specific libraries
- for Windows / Windows
- for Linux/Unix / Linux/Unix
- for OS X / OS X
- loading / Making it easy
- plugins, py.test
- about / Plugins
- URL / Plugins
- pytest-cov package / pytest-cov
- pytest-pep8 package / pytest-pep8 and pytest-flakes
- pytest-flakes package / pytest-pep8 and pytest-flakes
- configuring / Configuring plugins
- pool of workers
- creating / Creating a pool of workers
- powerset
- printf-style
- print statements
- about / Print statements and logging
- processes
- about / Processes
- data, sharing / Sharing data between processes
- profile statistics
- using / Using profile statistics
- profiling modules
- Ncalls / First profiling run
- Tottime / First profiling run
- Cumtime / First profiling run
- property decorator
- pudb
- about / Other debuggers
- py.test
- testing with / Testing with py.test
- and unittest output, differentiating / The difference between the unittest and py.test output
- versus unittest / The difference between unittest and py.test tests
- used, for testing packages / py.test
- py.test, versus unittest
- assertions, simplifying / Simplifying assertions
- tests, parameterizing / Parameterizing tests
- fixtures, used for automatic arguments / Automatic arguments using fixtures
- print statements / Print statements and logging
- logging / Print statements and logging
- plugins / Plugins
- py.test monkeypatch
- using / Using py.test monkeypatch
- monkeypatch.setattr / Using py.test monkeypatch
- monkeypatch.delattr / Using py.test monkeypatch
- monkeypatch.setitem / Using py.test monkeypatch
- monkeypatch.delitem / Using py.test monkeypatch
- monkeypatch.setenv / Using py.test monkeypatch
- monkeypatch.delenv / Using py.test monkeypatch
- monkeypatch.syspath_prepend / Using py.test monkeypatch
- monkeypatch.chdir / Using py.test monkeypatch
- pyflakes
- about / pyflakes
- PyFormat
- pylint
- used, for verifying code quality / Pylint
- PyObject*
- pytest-cov package
- about / pytest-cov
- pytest-flakes package
- about / pytest-pep8 and pytest-flakes
- pytest-pep8 package
- about / pytest-pep8 and pytest-flakes
- Python
- URL, for documentation / Windows
- Python-Statsd
- URL / Performance monitoring
- Python 3.4
- asyncio library, using / Python 3.4
- and Python 3.5, selecting between / Choosing between the 3.4 and 3.5 syntax
- Python 3.5
- asyncio library, using / Python 3.5
- Pythonic code
- about / Code style – or what is Pythonic code?
- strings, formatting / Formatting strings – printf-style or str.format?
- PEP20 / PEP20, the Zen of Python
- PEP8 / Explaining PEP8
- code quality, verifying / Verifying code quality, pep8, pyflakes, and more
- Pythonic code, pitfalls
- about / Common pitfalls
- scope usage / Scope matters!
- extra built-ins, overwriting / Overwriting and/or creating extra built-ins
- extra built-ins, creating / Overwriting and/or creating extra built-ins
- objects, modifying during iteration / Modifying while iterating
- exceptions, catching / Catching exceptions – differences between Python 2 and 3
- closures / Late binding – be careful with closures
- circular imports / Circular imports
- import collisions / Import collisions
- Python interpreter
- reference link / Introduction
- C/C++ modules, need for / Do you need C/C++ modules?
- for Windows / Windows
- for OS X / OS X
- for Linux/Unix / Linux/Unix
- Python memory manager
- heap / Reducing memory usage
- arenas / Reducing memory usage
- pools / Reducing memory usage
- blocks / Reducing memory usage
- Python package
- URL / Plugins
- Python Package Index (PyPI)
- Python Packaging User Guide
- URL / Setup parameters
Q
- QCacheGrind
- about / Using profile statistics
R
- Red Hat
- C/C++ packages, installing / Red Hat, CentOS, and Fedora
- Redis
- about / Caching
- reduce function
- about / reduce – combining pairs into a single result
- factorial function, implementing / Implementing a factorial function
- trees, processing / Processing trees
- references, reStructuredText syntax
- about / Links, references, and labels
- Regular Extensions
- about / Regular extensions
- remote processes
- about / Remote processes
- distributed processing, with multiprocessing / Distributed processing using multiprocessing
- distributed processing, with IPyparallel / Distributed processing using IPyparallel
- ReST
- about / The reStructuredText syntax
- reST
- about / The reStructuredText syntax
- reStructuredText syntax
- about / The reStructuredText syntax
- features / Getting started with reStructuredText
- inline markup / Inline markup
- headers / Headers
- lists / Lists
- links / Links, references, and labels
- references / Links, references, and labels
- labels / Links, references, and labels
- images / Images
- substitutions / Substitutions
- blocks / Blocks, code, math, comments, and quotes
- comments / Blocks, code, math, comments, and quotes
- code / Blocks, code, math, comments, and quotes
- quotes / Blocks, code, math, comments, and quotes
- math / Blocks, code, math, comments, and quotes
- conclusion / Conclusion
- rpdb2
- about / Other debuggers
- RST
- about / The reStructuredText syntax
S
- scope usage
- function arguments, using / Function arguments
- class properties, defining / Class properties
- variables, modifying in global scope / Modifying variables in the global scope
- selective profiling
- with decorators / Selective profiling using decorators
- sentry
- URL / Usage
- set
- about / set – like a dict without values
- set comprehensions
- about / set comprehensions
- setuptools package
- about / Setup parameters
- single-threaded parallel processing
- single dispatch
- singletons
- slots
- using / Using slots
- spam function
- about / Decorating functions
- Sphinx
- installing / Getting started with Sphinx
- sphinx-quickstart / Using sphinx-quickstart
- sphinx-apidoc command / Using sphinx-apidoc
- URL, for documentation / Sphinx roles
- URL / Sphinx roles
- sphinx-apidoc command
- about / Using sphinx-apidoc
- sphinx-quickstart
- about / Using sphinx-quickstart
- Sphinx directives
- about / Sphinx directives
- table of contents tree directive (toctree) / The table of contents tree directive (toctree)
- autodoc / Autodoc, documenting Python modules, classes, and functions
- Python modules, documenting / Autodoc, documenting Python modules, classes, and functions
- Python classes, documenting / Autodoc, documenting Python modules, classes, and functions
- Python functions, documenting / Autodoc, documenting Python modules, classes, and functions
- Sphinx documentation generator
- about / The Sphinx documentation generator
- Sphinx, installing / Getting started with Sphinx
- Sphinx directives / Sphinx directives
- Sphinx roles / Sphinx roles
- Sphinx roles
- about / Sphinx roles
- Sphinx style
- class, documenting / Documenting a class with the Sphinx style
- selecting / Which style to choose
- static function
- about / static
- staticmethod decorator
- versus classmethod decorator / Skipping the instance – classmethod and staticmethod
- str.format
- string concatenation
- about / String concatenation
- strings
- formatting, with printf-style / Formatting strings – printf-style or str.format?
- formatting, with str.format / Formatting strings – printf-style or str.format?
- substitutions
- about / Substitutions
T
- takewhile function
- tasks
- about / Futures and tasks
- tee
- tests
- parameterizing / Parameterizing tests
- timeit
- about / Timeit – comparing code snippet performance
- used, for comparing code snippet performance / Timeit – comparing code snippet performance
- total ordering class decorator
- tracemalloc
- used, for monitoring memory usage / Tracemalloc
- trace module
- used, for inspecting script / Inspecting your script using trace
- tracer.globaltrace function, parameters
- Call / Inspecting your script using trace
- Line / Inspecting your script using trace
- return / Inspecting your script using trace
- exception / Inspecting your script using trace
- c_call / Inspecting your script using trace
- c_return / Inspecting your script using trace
- c_exception / Inspecting your script using trace
- trees
- processing / Processing trees
- try/except
- versus if statement / Try versus if
- tuple
- about / tuple – the immutable list
U
- Ubuntu
- C/C++ packages, installing / Debian and Ubuntu
- unittest
- and py.test output, differentiating / The difference between the unittest and py.test output
- versus py.test / The difference between unittest and py.test tests
- used, for testing packages / Unittest
- unittest.mock
- using / Using unittest.mock
- useful decorators
- single dispatch / Single dispatch – polymorphism in Python
- with statement / Contextmanager, with statements made easy
- contextmanager class / Contextmanager, with statements made easy
- with statements / Contextmanager, with statements made easy
- validation / Validation, type checks, and conversions
- type checks / Validation, type checks, and conversions
- conversions / Validation, type checks, and conversions
- warnings, hiding / Useless warnings – how to ignore them
V
- value comparison
- versus identity comparison / Differences between value and identity comparisons
- venv
- used, for creating virtual Python environment / Creating a virtual Python environment using venv
- creating / Creating your first venv
- --system-site-packages argument / venv arguments
- --symlinks argument / venv arguments
- --copies argument / venv arguments
- --clear argument / venv arguments
- --upgrade argument / venv arguments
- --without-pip argument / venv arguments
- versus virtualenv / Differences between virtualenv and venv
- venv module
- virtualenv
- versus venv / Differences between virtualenv and venv
- virtualenv tool
- virtualenvwrapper
- virtual Python environment
- creating, venv used / Creating a virtual Python environment using venv
W
- warnings
- weakref module
- about / Memory leaks
- Werkzeug
- about / Other debuggers
- wheel package
- about / Wheels – the new eggs
- Python Package Index (PyPI) / Distributing to the Python Package Index
- Windows
- with statement
X
- Xcode
- URL / OS X
Y
- Y combinator
- about / The Y combinator