O

object persistence, Database Programming, Nesting Revisited, Nesting Revisited, Step 7 (Final): Storing Objects in a Database, Pickles and Shelves, Stream Processors Revisited
(see also specific modules)
about, Nesting Revisited, Step 7 (Final): Storing Objects in a Database
classes and, Stream Processors Revisited
database programming and, Database Programming
implementing, Pickles and Shelves
object relational mappers (ORMs), Database Programming, Future Directions
object serialization, The pickle Object Serialization ModuleThe pickle Object Serialization Module
object superclass, Namespace Links: A Tree Climber, New-Style Class Changes, All Classes Derive from “object”Implications for defaults
object types, It’s Powerful, It’s Powerful, Python’s Core Data Types, Python’s Core Data Types, Python’s Core Data Types, Numbers, Strings, Lists, Dictionaries, Tuples, Files, Test Your Knowledge: Quiz, The Dynamic Typing InterludeTest Your Knowledge: Answers, General Type CategoriesMutable Types Can Be Changed in Place, Object Flexibility, New-Style Class Changes, Type Model ChangesImplications for type testing, Other Applications: Type Testing (If You Insist!)
built-in, It’s Powerful (see built-in object types)
compound, Object Flexibility
dictionaries, Dictionaries (see dictionaries)
dynamic typing, It’s Powerful, Python’s Core Data Types, The Dynamic Typing InterludeTest Your Knowledge: Answers
files, Files (see files)
general type categories, General Type CategoriesMutable Types Can Be Changed in Place
implementation-related, Python’s Core Data Types
lists, Lists (see lists)
numbers, Numbers (see numbers)
quiz questions and answers, Test Your Knowledge: Quiz
strings, Strings (see strings)
strong typing, Python’s Core Data Types
testing, New-Style Class Changes, Type Model ChangesImplications for type testing, Other Applications: Type Testing (If You Insist!)
tuples, Tuples (see tuples)
object-oriented programming, It’s Object-Oriented and Functional (see OOP)
objects, It’s Powerful, Introducing Python Object Types, Introducing Python Object Types, The Python Conceptual Hierarchy, Why Use Built-in Types?, Python’s Core Data Types, Python’s Core Data Types, Nesting Revisited, Iteration and Optimization, Iteration and Optimization, The Dynamic Typing InterludeTest Your Knowledge: Answers, Variables, Objects, and References, Variables, Objects, and References, Variables, Objects, and References, Variables, Objects, and References, Objects Are Garbage-Collected, Objects Are Garbage-Collected, Shared ReferencesShared References and Equality, Iterations: A First Look, The full iteration protocol, Other Built-in Type Iterables, Example: Modules Are ObjectsExample: Modules Are Objects, Attribute Inheritance SearchAttribute Inheritance Search, Updating Objects on a Shelve, Intercepting Slices, Iterable Objects: __iter__ and __next__Multiple iterators with yield, Methods Are Objects: Bound or UnboundOther callables, Classes Are Objects: Generic Object FactoriesWhy Factories?, Listing attributes per object in class treesRunning the tree lister, The “New Style” Class Model
(see also immutable objects; mutable objects)
about, Introducing Python Object Types, Why Use Built-in Types?, Variables, Objects, and References
attributes for, Attribute Inheritance SearchAttribute Inheritance Search
classes and, Classes Are Objects: Generic Object FactoriesWhy Factories?, The “New Style” Class Model
dynamic typing, It’s Powerful, Python’s Core Data Types, The Dynamic Typing InterludeTest Your Knowledge: Answers
expressions and, The Python Conceptual Hierarchy
garbage collection, Nesting Revisited, Objects Are Garbage-Collected
iterable, Iteration and Optimization, Iterations: A First Look, The full iteration protocol, Other Built-in Type Iterables, Iterable Objects: __iter__ and __next__Multiple iterators with yield
listing attributes per, Listing attributes per object in class treesRunning the tree lister
methods as, Methods Are Objects: Bound or UnboundOther callables
modules as, Example: Modules Are ObjectsExample: Modules Are Objects
optimizing, Iteration and Optimization
reference counters, Variables, Objects, and References, Objects Are Garbage-Collected
shared references and, Shared ReferencesShared References and Equality
slice, Intercepting Slices
strong typing, Python’s Core Data Types
type designators, Variables, Objects, and References
updating on shelves, Updating Objects on a Shelve
variables and, Variables, Objects, and References
oct built-in function, Numeric Literals, Hex, Octal, Binary: Literals and Conversions
__oct__ method, But 3.X’s __index__ Is Not Indexing!
octal notation, Numeric Literals, Hex, Octal, Binary: Literals and ConversionsHex, Octal, Binary: Literals and Conversions
OOP (object-oriented programming), It’s Object-Oriented and Functional, User-Defined Classes, Function Design Concepts, Why Use Classes?, Attribute Inheritance SearchAttribute Inheritance Search, Classes and Instances, Method Calls, Coding Class TreesCoding Class Trees, Operator Overloading, OOP Is About Code ReuseProgramming by customization, Programming by customization, Test Your Knowledge: Quiz, Class Coding BasicsTest Your Knowledge: Answers, A More Realistic ExampleTest Your Knowledge: Answers, OOP: The Big Idea, OOP Is Simpler Than You May Think, Class Coding DetailsTest Your Knowledge: Answers, Operator OverloadingTest Your Knowledge: Answers, Python and OOP, Polymorphism Means Interfaces, Not Call Signatures, OOP and Inheritance: “Is-a” RelationshipsOOP and Inheritance: “Is-a” Relationships, OOP and Composition: “Has-a” RelationshipsStream Processors Revisited, OOP and Delegation: “Wrapper” Proxy ObjectsOOP and Delegation: “Wrapper” Proxy Objects, Pseudoprivate Class AttributesWhy Use Pseudoprivate Attributes?, Methods Are Objects: Bound or UnboundOther callables, Classes Are Objects: Generic Object FactoriesWhy Factories?, Multiple Inheritance: “Mix-in” ClassesRoom for improvement: MRO, slots, GUIs, Extending Built-in TypesExtending Types by Subclassing, The “New Style” Class ModelOther Class Changes and Extensions, Static and Class MethodsCounting instances per class with class methods, Decorators and Metaclasses: Part 1For More Details, The super Built-in Function: For Better or Worse?The super Summary, Class GotchasKISS Revisited: “Overwrapping-itis”, KISS Revisited: “Overwrapping-itis”, Exception ObjectsTest Your Knowledge: Answers, Using State Information in Descriptors, Overloading class creation calls with metaclasses
about, OOP: The Big Idea
attribute inheritance, Attribute Inheritance SearchAttribute Inheritance Search
bound and unbound methods, Methods Are Objects: Bound or UnboundOther callables
class gotchas, Class GotchasKISS Revisited: “Overwrapping-itis”
classes and instances, Why Use Classes?, Classes and Instances
code reuse, OOP Is About Code ReuseProgramming by customization
coding class trees, Coding Class TreesCoding Class Trees
coding classes, Class Coding BasicsTest Your Knowledge: Answers, Class Coding DetailsTest Your Knowledge: Answers
composition and, OOP and Composition: “Has-a” RelationshipsStream Processors Revisited
by customization, Programming by customization
decorators and metaclasses, Decorators and Metaclasses: Part 1For More Details
delegation and, OOP and Delegation: “Wrapper” Proxy ObjectsOOP and Delegation: “Wrapper” Proxy Objects
exception classes, Exception ObjectsTest Your Knowledge: Answers
extending built-in types, Extending Built-in TypesExtending Types by Subclassing
generic object factories, Classes Are Objects: Generic Object FactoriesWhy Factories?
important concepts in, OOP Is Simpler Than You May Think
inheritance and, OOP and Inheritance: “Is-a” RelationshipsOOP and Inheritance: “Is-a” Relationships
KISS principle, KISS Revisited: “Overwrapping-itis”
metaclasses, Overloading class creation calls with metaclasses
method calls, Method Calls
mix-in classes, Multiple Inheritance: “Mix-in” ClassesRoom for improvement: MRO, slots, GUIs
new-style classes, The “New Style” Class ModelOther Class Changes and Extensions
operator overloading, Operator Overloading, Operator OverloadingTest Your Knowledge: Answers
polymorphism and, Polymorphism Means Interfaces, Not Call Signatures
pseudoprivate class attributes, Pseudoprivate Class AttributesWhy Use Pseudoprivate Attributes?
Python and, It’s Object-Oriented and Functional, User-Defined Classes, Function Design Concepts, Python and OOP
quiz questions and answers, Test Your Knowledge: Quiz
realistic example of classes, A More Realistic ExampleTest Your Knowledge: Answers
state information, Using State Information in Descriptors
static and class methods, Static and Class MethodsCounting instances per class with class methods
super built-in function, The super Built-in Function: For Better or Worse?The super Summary
open built-in function, Files, Other File-Like Tools, Opening Files, Files in Action, Text and Binary Files: The Short Story, State with mutables: Obscure ghost of Pythons past?State with mutables: Obscure ghost of Pythons past?
customizing, State with mutables: Obscure ghost of Pythons past?State with mutables: Obscure ghost of Pythons past?
file processing and, Files, Other File-Like Tools, Opening Files
version considerations, Text and Binary Files: The Short Story
Windows platform and, Files in Action
operations, Lists (see specific operations)
operator module, Combining Items in Iterables: reduce
operator overloading, Getting Help, Preview: Operator overloading and polymorphism, Core Types Review and Summary, Neutralizing display differences with code, Why Use Classes?, Operator Overloading, Classes Can Intercept Python Operators, A Third ExampleReturning results, or not, Why Use Operator Overloading?, Step 3: Operator OverloadingProviding Print Displays, The Basics, Constructors and Expressions: __init__ and __sub__, Common Operator Overloading MethodsCommon Operator Overloading Methods, Indexing and Slicing: __getitem__ and __setitem__But 3.X’s __index__ Is Not Indexing!, Index Iteration: __getitem__Multiple iterators with yield, Membership: __contains__, __iter__, and __getitem__Membership: __contains__, __iter__, and __getitem__, Attribute Access: __getattr__ and __setattr__Emulating Privacy for Instance Attributes: Part 1, String Representation: __repr__ and __str__Display Usage Notes, Right-Side and In-Place Uses: __radd__ and __iadd__In-Place Addition, Call Expressions: __call__Function Interfaces and Callback-Based Code, Comparisons: __lt__, __gt__, and OthersThe __cmp__ Method in Python 2.X, Boolean Tests: __bool__ and __len__Boolean Methods in Python 2.X, Object Destruction: __del__Destructor Usage Notes, Test Your Knowledge: Quiz, Limitation: Operator overloading, __getattr__ and __getattribute__Delegation-based managers revisited, __getattr__ and __getattribute__, Caveat: Implicitly run operator overloading methods fail to delegate under 3.X, Should operator methods be validated?, Overloading class creation calls with normal classesOverloading class creation calls with metaclasses, Operator Overloading in Metaclass Methods
about, Core Types Review and Summary, Why Use Classes?, Operator Overloading, Classes Can Intercept Python Operators, The Basics, __getattr__ and __getattribute__
attributes and, Attribute Access: __getattr__ and __setattr__Emulating Privacy for Instance Attributes: Part 1, __getattr__ and __getattribute__Delegation-based managers revisited
binary operator methods, Right-Side and In-Place Uses: __radd__ and __iadd__In-Place Addition
Boolean tests and, Boolean Tests: __bool__ and __len__Boolean Methods in Python 2.X
call expressions and, Call Expressions: __call__Function Interfaces and Callback-Based Code
common methods, Common Operator Overloading MethodsCommon Operator Overloading Methods
comparisons and, Comparisons: __lt__, __gt__, and OthersThe __cmp__ Method in Python 2.X
constructors and expressions, Constructors and Expressions: __init__ and __sub__
delegation and, Caveat: Implicitly run operator overloading methods fail to delegate under 3.X
display formats and, Neutralizing display differences with code
double underscores and, Getting Help
indexing and slicing, Indexing and Slicing: __getitem__ and __setitem__But 3.X’s __index__ Is Not Indexing!
iteration and, Index Iteration: __getitem__Multiple iterators with yield
membership and, Membership: __contains__, __iter__, and __getitem__Membership: __contains__, __iter__, and __getitem__
metaclasses and, Overloading class creation calls with normal classesOverloading class creation calls with metaclasses, Operator Overloading in Metaclass Methods
object destruction, Object Destruction: __del__Destructor Usage Notes
polymorphism and, Preview: Operator overloading and polymorphism
quiz questions and answers, Test Your Knowledge: Quiz
string representation and, String Representation: __repr__ and __str__Display Usage Notes
super built-in function and, Limitation: Operator overloading
usage considerations, Why Use Operator Overloading?
usage examples, A Third ExampleReturning results, or not, Step 3: Operator OverloadingProviding Print Displays
validating methods, Should operator methods be validated?
operator precedence, Mixed operators follow operator precedence
optimizing objects, Execution Optimization ToolsPsyco: The original just-in-time compiler, Iteration and Optimization, Optimized byte code files, Development Tools for Larger Projects
about, Iteration and Optimization, Development Tools for Larger Projects
byte code files, Optimized byte code files
execution optimization tools, Execution Optimization ToolsPsyco: The original just-in-time compiler
optparse module, Example: Dual Mode Code
__or__ method, Common Operator Overloading Methods
or operator, The if/else Ternary Expression
ord built-in function, Character code conversions, List Comprehensions Versus map, Character Encoding Schemes
OrderedDict subclass, More Dictionary Methods
ordering, More Dictionary Methods (see sorting)
ORMs (object relational mappers), Database Programming, Future Directions
os module, Other File Tools, Other File Tools, Nested for loops, Generating Both Offsets and Items: enumerate, Generating Both Offsets and Items: enumerate, Other Built-in Type Iterables, Other Built-in Type Iterables, Generators and library tools: Directory walkers, Generators and library tools: Directory walkers, Benchmark Script Results, Running In-Process Tests, Running In-Process Tests, Catching Too Much: Avoid Empty except and Exception
descriptor files, Other File Tools
_exit function, Catching Too Much: Avoid Empty except and Exception
popen function, Other File Tools, Nested for loops, Generating Both Offsets and Items: enumerate, Other Built-in Type Iterables, Generators and library tools: Directory walkers, Benchmark Script Results, Running In-Process Tests
system function, Generating Both Offsets and Items: enumerate, Running In-Process Tests
walk function, Other Built-in Type Iterables, Generators and library tools: Directory walkers
OSError class, Built-in Exception Categories
OverflowError exception, Built-in Exception Classes, Built-in Exception Categories