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 Superclasses–Abstract 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 Interactively–Exploring Shelves Interactively, Updating Objects on a Shelve
-
- dictionary interfaces, The shelve module
- exploring interactively, Exploring Shelves Interactively–Exploring 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.X–Function Annotations in 3.X, Decorator Arguments Versus Function Annotations–Decorator 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 Examples–The defunct apply built-in (Python 2.X), Arbitrary arguments
- arbitrary expressions, Sequence Operations
- arbitrary structures, Handling Arbitrary Structures–More recursion examples
- argparse module, Example: Dual Mode Code
- arguments, Method Call Syntax, Coding Functions, Argument-Passing Basics, Arguments and Shared References–Arguments 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 Modes–The Gritty Details, Argument Matching Basics, Argument Matching Basics, Argument Matching Basics, Keyword and Default Examples–Combining keywords and defaults, Arbitrary Arguments Examples–The defunct apply built-in (Python 2.X), Headers: Collecting arguments, Calls: Unpacking arguments, The min Wakeup Call!–The Punch Line..., Generalized Set Functions–Generalized Set Functions, Emulating the Python 3.X print Function–Using 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 Objects–Defaults and Mutable Objects, The World’s Simplest Python Class, Coding Constructors, Why the Special Methods?, Decorator Arguments, Adding Decorator Arguments–Timing with decorator arguments, Example: Validating Function Arguments–Other Applications: Type Testing (If You Insist!), A Basic Range-Testing Decorator for Positional Arguments–Other Applications: Type Testing (If You Insist!), Arbitrary arguments, Decorator Arguments Versus Function Annotations–Decorator Arguments Versus Function Annotations, Running script files with arguments
-
- (see also keyword arguments)
- about, Argument-Passing Basics
- arbitrary, Arbitrary Arguments Examples–The 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 Arguments–Timing with decorator arguments, Example: Validating Function Arguments–Other Applications: Type Testing (If You Insist!), Decorator Arguments Versus Function Annotations–Decorator Arguments Versus Function Annotations
- default values, Argument Matching Basics, Keyword and Default Examples–Combining keywords and defaults, Defaults and Mutable Objects–Defaults and Mutable Objects
- intersecting sequences example, Generalized Set Functions–Generalized Set Functions
- matching, Special Argument-Matching Modes–The Gritty Details, Emulating the Python 3.X print Function–Using Keyword-Only Arguments
- positional, Argument Matching Basics, Headers: Collecting arguments, A Basic Range-Testing Decorator for Positional Arguments–Other 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 References–Arguments 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 Forms–Assignment Statement Forms, Assignment Statement Forms, Assignment Statement Forms, Assignment Statement Forms–Advanced sequence assignment patterns, Assignment Statement Forms, Assignment Statement Forms, Assignment Statement Forms, Extended Sequence Unpacking in Python 3.X–Application to for loops, Multiple-Target Assignments–Multiple-target assignment and shared references, Augmented Assignments–Augmented assignment and shared references, Variable Name Rules–Names have no type, but objects do, Test Your Knowledge: Quiz, Tuple assignment in for loops–Tuple 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 Assignments–Augmented assignment and shared references
- extended sequence unpacking, Assignment Statement Forms, Extended Sequence Unpacking in Python 3.X–Application 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 Assignments–Multiple-target assignment and shared references
- quiz questions and answers, Test Your Knowledge: Quiz
- sequence assignments, Assignment Statement Forms–Advanced sequence assignment patterns
- syntax patterns, Assignment Statement Forms–Assignment Statement Forms
- tuple-unpacking assignments, Assignment Statement Forms, Tuple assignment in for loops–Tuple assignment in for loops, On the other hand: performance, conciseness, expressiveness
- variable name rules, Variable Name Rules–Names 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 Instances–For 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 Instances–For more details
- AttributeError exception, Attribute Reference, The Basics
- attributes, The Grander Module Story: Attributes–Modules and namespaces, The Grander Module Story: Attributes, Flexible reference syntax: Extra complexity and functional overlap, How to Structure a Program–Imports and Attributes, Attribute Name Qualification, Attribute Inheritance Search–Attribute Inheritance Search, Class Objects Provide Default Behavior, Classes Are Customized by Inheritance, Classes Are Attributes in Modules, Other Ways to Combine Classes, Special Class Attributes–Special 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 dir–Listing inherited attributes with dir, Listing attributes per object in class trees–Running the tree lister, Example: Mapping Attributes to Inheritance Sources–Example: Mapping Attributes to Inheritance Sources, Handling slots and other “virtual” attributes generically–Handling 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, Properties–Setter and deleter decorators, Descriptors–Descriptors and slots and more, __getattr__ and __getattribute__–Delegation-based managers revisited, Intercepting Built-in Operation Attributes–Delegation-based managers revisited, Example: Attribute Validations–Using __getattribute__ to Validate, Test Your Knowledge: Quiz–Test 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 Attributes–Delegation-based managers revisited
- data, Example
- descriptors and, Descriptors–Descriptors and slots and more
- handling generically, Handling slots and other “virtual” attributes generically–Handling slots and other “virtual” attributes generically
- inheritance and, Attribute Inheritance Search–Attribute Inheritance Search, Classes Are Customized by Inheritance, Listing inherited attributes with dir–Listing inherited attributes with dir
- listing per object, Listing attributes per object in class trees–Running 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 Sources–Example: Mapping Attributes to Inheritance Sources
- modules and, The Grander Module Story: Attributes–Modules and namespaces, How to Structure a Program–Imports 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, Properties–Setter and deleter decorators
- quiz questions and answers, Test Your Knowledge: Quiz–Test Your Knowledge: Answers
- referencing, Attribute Reference
- special class, Special Class Attributes–Special Class Attributes
- string method calls and, Flexible reference syntax: Extra complexity and functional overlap
- validating, Example: Attribute Validations–Using __getattribute__ to Validate
- augmented assignments, Assignment Statement Forms, Augmented Assignments–Augmented assignment and shared references
- augmented classes, Manual Augmentation–Metaclass-Based Augmentation, Decorator-based augmentation
- automatic memory management, It’s Powerful
- awk utility, Generating Both Offsets and Items: enumerate