A

abs built-in function, Other Built-in Numeric Tools
absolute imports, Relative Import Basics, Relative imports versus absolute package paths, Selecting modules with relative and absolute imports, Fix 2: Full path absolute import
abstract superclasses, Abstract SuperclassesAbstract superclasses in Python 3.X and 2.6+: Preview, Stream Processors Revisited
access-by-key databases and filesystems, Nesting Revisited, The has_key method is dead in 3.X: Long live in!, Storing Native Python Objects: pickle, Other Built-in Type Iterables, Pickles and Shelves, The shelve module, Storing Objects on a Shelve Database, Exploring Shelves InteractivelyExploring Shelves Interactively, Updating Objects on a Shelve
dictionary interfaces, The shelve module
exploring interactively, Exploring Shelves InteractivelyExploring Shelves Interactively
iterations and, Other Built-in Type Iterables
object persistence and, Nesting Revisited, Pickles and Shelves
pickle module, Storing Native Python Objects: pickle
storing objects on, The has_key method is dead in 3.X: Long live in!, Storing Objects on a Shelve Database
updating objects, Updating Objects on a Shelve
accessor functions, Program Design: Minimize Cross-File Changes, Function Design Concepts
__add__ method, Getting Help, A Third Example, Common Operator Overloading Methods, Reusing __add__ in __radd__
addition operation, Numbers
all built-in function, Other Iteration Contexts
__all__ variable, Package initialization file roles, Minimizing from * Damage: _X and __all__
Android platform, Installation Steps
annotations, Function Annotations in 3.XFunction Annotations in 3.X, Decorator Arguments Versus Function AnnotationsDecorator Arguments Versus Function Annotations
__annotations__ attribute, Function Annotations in 3.X
anonymous functions, Anonymous Functions: lambda (see lambda expressions)
any built-in function, Other Iteration Contexts
anydbm module, Pickles and Shelves
apply built-in function, The defunct apply built-in (Python 2.X), Classes Are Objects: Generic Object Factories
arbitrary arguments, Arbitrary Arguments ExamplesThe defunct apply built-in (Python 2.X), Arbitrary arguments
arbitrary expressions, Sequence Operations
arbitrary structures, Handling Arbitrary StructuresMore recursion examples
argparse module, Example: Dual Mode Code
arguments, Method Call Syntax, Coding Functions, Argument-Passing Basics, Arguments and Shared ReferencesArguments and Shared References, Avoiding Mutable Argument Changes, Simulating Output Parameters and Multiple Results, Simulating Output Parameters and Multiple Results, Simulating Output Parameters and Multiple Results, Special Argument-Matching ModesThe Gritty Details, Argument Matching Basics, Argument Matching Basics, Argument Matching Basics, Keyword and Default ExamplesCombining keywords and defaults, Arbitrary Arguments ExamplesThe defunct apply built-in (Python 2.X), Headers: Collecting arguments, Calls: Unpacking arguments, The min Wakeup Call!The Punch Line..., Generalized Set FunctionsGeneralized Set Functions, Emulating the Python 3.X print FunctionUsing Keyword-Only Arguments, Test Your Knowledge: Quiz, Function Design Concepts, Scopes: lambdas Can Be Nested Too, Coding your own zip(...) and map(None, ...), Defaults and Mutable ObjectsDefaults and Mutable Objects, The World’s Simplest Python Class, Coding Constructors, Why the Special Methods?, Decorator Arguments, Adding Decorator ArgumentsTiming with decorator arguments, Example: Validating Function ArgumentsOther Applications: Type Testing (If You Insist!), A Basic Range-Testing Decorator for Positional ArgumentsOther Applications: Type Testing (If You Insist!), Arbitrary arguments, Decorator Arguments Versus Function AnnotationsDecorator Arguments Versus Function Annotations, Running script files with arguments
(see also keyword arguments)
about, Argument-Passing Basics
arbitrary, Arbitrary Arguments ExamplesThe defunct apply built-in (Python 2.X), Arbitrary arguments
avoiding changes, Avoiding Mutable Argument Changes
calculating lengths of, Coding your own zip(...) and map(None, ...)
call expressions and, Method Call Syntax
coding functions, Coding Functions
decorator, Decorator Arguments, Adding Decorator ArgumentsTiming with decorator arguments, Example: Validating Function ArgumentsOther Applications: Type Testing (If You Insist!), Decorator Arguments Versus Function AnnotationsDecorator Arguments Versus Function Annotations
default values, Argument Matching Basics, Keyword and Default ExamplesCombining keywords and defaults, Defaults and Mutable ObjectsDefaults and Mutable Objects
intersecting sequences example, Generalized Set FunctionsGeneralized Set Functions
matching, Special Argument-Matching ModesThe Gritty Details, Emulating the Python 3.X print FunctionUsing Keyword-Only Arguments
positional, Argument Matching Basics, Headers: Collecting arguments, A Basic Range-Testing Decorator for Positional ArgumentsOther Applications: Type Testing (If You Insist!)
quiz questions and answers, Test Your Knowledge: Quiz
running script files with, Running script files with arguments
self, Function Design Concepts, Scopes: lambdas Can Be Nested Too, The World’s Simplest Python Class, Coding Constructors, Why the Special Methods?
shared references and, Arguments and Shared ReferencesArguments and Shared References
simulating multiple results, Simulating Output Parameters and Multiple Results
simulating output parameters, Simulating Output Parameters and Multiple Results
unpacking, Simulating Output Parameters and Multiple Results, Calls: Unpacking arguments
usage example, The min Wakeup Call!The Punch Line...
ArithmeticError class, Built-in Exception Classes, Built-in Exception Categories
arrays, lists and, Type-Specific Operations
as extension for import/from statements, The as Extension for import and from
ascii built-in function, Advanced Formatting Method Syntax
ASCII character set, Escape Sequences Represent Special Characters, Character code conversions, List Comprehensions Versus map, Character Encoding Schemes, Coding ASCII Text
about, Character Encoding Schemes
character code conversions, Character code conversions
encoding, Coding ASCII Text
encoding and decoding, Escape Sequences Represent Special Characters
usage example, List Comprehensions Versus map
aspect-oriented programming, Why Decorators?
assert statement, Python’s Statements, Exception Basics, Exception Roles, Raising Exceptions, The assert Statement, Example: Trapping Constraints (but Not Errors!)
about, Python’s Statements, Exception Basics, The assert Statement
special-case handling, Exception Roles
triggering exceptions, Raising Exceptions
usage example, Example: Trapping Constraints (but Not Errors!)
AssertionError exception, The assert Statement
assignment statements, Python’s Statements, Assignment Statements, Assignment Statement FormsAssignment Statement Forms, Assignment Statement Forms, Assignment Statement Forms, Assignment Statement FormsAdvanced sequence assignment patterns, Assignment Statement Forms, Assignment Statement Forms, Assignment Statement Forms, Extended Sequence Unpacking in Python 3.XApplication to for loops, Multiple-Target AssignmentsMultiple-target assignment and shared references, Augmented AssignmentsAugmented assignment and shared references, Variable Name RulesNames have no type, but objects do, Test Your Knowledge: Quiz, Tuple assignment in for loopsTuple assignment in for loops, Python 3.X extended sequence assignment in for loops, Nested Scope Details, On the other hand: performance, conciseness, expressiveness
about, Python’s Statements, Assignment Statements, Nested Scope Details
augmented assignments, Assignment Statement Forms, Augmented AssignmentsAugmented assignment and shared references
extended sequence unpacking, Assignment Statement Forms, Extended Sequence Unpacking in Python 3.XApplication to for loops, Python 3.X extended sequence assignment in for loops
list-unpacking assignments, Assignment Statement Forms
multiple-target assignments, Assignment Statement Forms, Multiple-Target AssignmentsMultiple-target assignment and shared references
quiz questions and answers, Test Your Knowledge: Quiz
sequence assignments, Assignment Statement FormsAdvanced sequence assignment patterns
syntax patterns, Assignment Statement FormsAssignment Statement Forms
tuple-unpacking assignments, Assignment Statement Forms, Tuple assignment in for loopsTuple assignment in for loops, On the other hand: performance, conciseness, expressiveness
variable name rules, Variable Name RulesNames have no type, but objects do
asterisk (*), Numbers, Sequence Operations, Basic Operations, Basic List Operations
atexit module, Debugging with Outer try Statements
attribute fetches, Method Call Syntax, Attribute Name Qualification, Other Ways to Combine Classes, New-Style Class Changes, Attribute Fetch for Built-ins Skips InstancesFor more details
about, Method Call Syntax, Other Ways to Combine Classes
attribute name qualification and, Attribute Name Qualification
built-in types and, New-Style Class Changes, Attribute Fetch for Built-ins Skips InstancesFor more details
AttributeError exception, Attribute Reference, The Basics
attributes, The Grander Module Story: AttributesModules and namespaces, The Grander Module Story: Attributes, Flexible reference syntax: Extra complexity and functional overlap, How to Structure a ProgramImports and Attributes, Attribute Name Qualification, Attribute Inheritance SearchAttribute Inheritance Search, Class Objects Provide Default Behavior, Classes Are Customized by Inheritance, Classes Are Attributes in Modules, Other Ways to Combine Classes, Special Class AttributesSpecial Class Attributes, Example, Attribute Names: Object Namespaces, Attribute Access: __getattr__ and __setattr__Emulating Privacy for Instance Attributes: Part 1, Attribute Reference, Attribute Assignment and Deletion, Attribute Assignment and Deletion, Other Attribute Management Tools, Emulating Privacy for Instance Attributes: Part 1, Listing inherited attributes with dirListing inherited attributes with dir, Listing attributes per object in class treesRunning the tree lister, Example: Mapping Attributes to Inheritance SourcesExample: Mapping Attributes to Inheritance Sources, Handling slots and other “virtual” attributes genericallyHandling slots and other “virtual” attributes generically, __getattribute__ and Descriptors: Attribute Tools, Why Manage Attributes?Inserting Code to Run on Attribute Access, Inserting Code to Run on Attribute Access, PropertiesSetter and deleter decorators, DescriptorsDescriptors and slots and more, __getattr__ and __getattribute__Delegation-based managers revisited, Intercepting Built-in Operation AttributesDelegation-based managers revisited, Example: Attribute ValidationsUsing __getattribute__ to Validate, Test Your Knowledge: QuizTest Your Knowledge: Answers
(see also specific types of attributes)
about, The Grander Module Story: Attributes, Class Objects Provide Default Behavior
accessing, Inserting Code to Run on Attribute Access
assigning and deleting, Attribute Assignment and Deletion
attribute tools, __getattribute__ and Descriptors: Attribute Tools
built-in, Other Ways to Combine Classes, Intercepting Built-in Operation AttributesDelegation-based managers revisited
data, Example
descriptors and, DescriptorsDescriptors and slots and more
handling generically, Handling slots and other “virtual” attributes genericallyHandling slots and other “virtual” attributes generically
inheritance and, Attribute Inheritance SearchAttribute Inheritance Search, Classes Are Customized by Inheritance, Listing inherited attributes with dirListing inherited attributes with dir
listing per object, Listing attributes per object in class treesRunning the tree lister
managing, Other Attribute Management Tools, Why Manage Attributes?Inserting Code to Run on Attribute Access
mapping to inheritance sources, Example: Mapping Attributes to Inheritance SourcesExample: Mapping Attributes to Inheritance Sources
modules and, The Grander Module Story: AttributesModules and namespaces, How to Structure a ProgramImports and Attributes, Classes Are Attributes in Modules
name qualification for, Attribute Name Qualification
namespaces and, Attribute Names: Object Namespaces
operator overloading and, Attribute Access: __getattr__ and __setattr__Emulating Privacy for Instance Attributes: Part 1, __getattr__ and __getattribute__Delegation-based managers revisited
privacy considerations, Emulating Privacy for Instance Attributes: Part 1
properties for, PropertiesSetter and deleter decorators
quiz questions and answers, Test Your Knowledge: QuizTest Your Knowledge: Answers
referencing, Attribute Reference
special class, Special Class AttributesSpecial Class Attributes
string method calls and, Flexible reference syntax: Extra complexity and functional overlap
validating, Example: Attribute ValidationsUsing __getattribute__ to Validate
augmented assignments, Assignment Statement Forms, Augmented AssignmentsAugmented assignment and shared references
augmented classes, Manual AugmentationMetaclass-Based Augmentation, Decorator-based augmentation
automatic memory management, It’s Powerful
awk utility, Generating Both Offsets and Items: enumerate