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 Module–The 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 Interlude–Test Your Knowledge: Answers, General Type Categories–Mutable Types Can Be Changed in Place, Object Flexibility, New-Style Class Changes, Type Model Changes–Implications 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 Interlude–Test Your Knowledge: Answers
- files, Files (see files)
- general type categories, General Type Categories–Mutable 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 Changes–Implications 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 Interlude–Test 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 References–Shared References and Equality, Iterations: A First Look, The full iteration protocol, Other Built-in Type Iterables, Example: Modules Are Objects–Example: Modules Are Objects, Attribute Inheritance Search–Attribute Inheritance Search, Updating Objects on a Shelve, Intercepting Slices, Iterable Objects: __iter__ and __next__–Multiple iterators with yield, Methods Are Objects: Bound or Unbound–Other callables, Classes Are Objects: Generic Object Factories–Why Factories?, Listing attributes per object in class trees–Running 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 Search–Attribute Inheritance Search
- classes and, Classes Are Objects: Generic Object Factories–Why Factories?, The “New Style” Class Model
- dynamic typing, It’s Powerful, Python’s Core Data Types, The Dynamic Typing Interlude–Test 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 trees–Running the tree lister
- methods as, Methods Are Objects: Bound or Unbound–Other callables
- modules as, Example: Modules Are Objects–Example: Modules Are Objects
- optimizing, Iteration and Optimization
- reference counters, Variables, Objects, and References, Objects Are Garbage-Collected
- shared references and, Shared References–Shared 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 Conversions–Hex, 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 Search–Attribute Inheritance Search, Classes and Instances, Method Calls, Coding Class Trees–Coding Class Trees, Operator Overloading, OOP Is About Code Reuse–Programming by customization, Programming by customization, Test Your Knowledge: Quiz, Class Coding Basics–Test Your Knowledge: Answers, A More Realistic Example–Test Your Knowledge: Answers, OOP: The Big Idea, OOP Is Simpler Than You May Think, Class Coding Details–Test Your Knowledge: Answers, Operator Overloading–Test Your Knowledge: Answers, Python and OOP, Polymorphism Means Interfaces, Not Call Signatures, OOP and Inheritance: “Is-a” Relationships–OOP and Inheritance: “Is-a” Relationships, OOP and Composition: “Has-a” Relationships–Stream Processors Revisited, OOP and Delegation: “Wrapper” Proxy Objects–OOP and Delegation: “Wrapper” Proxy Objects, Pseudoprivate Class Attributes–Why Use Pseudoprivate Attributes?, Methods Are Objects: Bound or Unbound–Other callables, Classes Are Objects: Generic Object Factories–Why Factories?, Multiple Inheritance: “Mix-in” Classes–Room for improvement: MRO, slots, GUIs, Extending Built-in Types–Extending Types by Subclassing, The “New Style” Class Model–Other Class Changes and Extensions, Static and Class Methods–Counting instances per class with class methods, Decorators and Metaclasses: Part 1–For More Details, The super Built-in Function: For Better or Worse?–The super Summary, Class Gotchas–KISS Revisited: “Overwrapping-itis”, KISS Revisited: “Overwrapping-itis”, Exception Objects–Test Your Knowledge: Answers, Using State Information in Descriptors, Overloading class creation calls with metaclasses
-
- about, OOP: The Big Idea
- attribute inheritance, Attribute Inheritance Search–Attribute Inheritance Search
- bound and unbound methods, Methods Are Objects: Bound or Unbound–Other callables
- class gotchas, Class Gotchas–KISS Revisited: “Overwrapping-itis”
- classes and instances, Why Use Classes?, Classes and Instances
- code reuse, OOP Is About Code Reuse–Programming by customization
- coding class trees, Coding Class Trees–Coding Class Trees
- coding classes, Class Coding Basics–Test Your Knowledge: Answers, Class Coding Details–Test Your Knowledge: Answers
- composition and, OOP and Composition: “Has-a” Relationships–Stream Processors Revisited
- by customization, Programming by customization
- decorators and metaclasses, Decorators and Metaclasses: Part 1–For More Details
- delegation and, OOP and Delegation: “Wrapper” Proxy Objects–OOP and Delegation: “Wrapper” Proxy Objects
- exception classes, Exception Objects–Test Your Knowledge: Answers
- extending built-in types, Extending Built-in Types–Extending Types by Subclassing
- generic object factories, Classes Are Objects: Generic Object Factories–Why Factories?
- important concepts in, OOP Is Simpler Than You May Think
- inheritance and, OOP and Inheritance: “Is-a” Relationships–OOP 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” Classes–Room for improvement: MRO, slots, GUIs
- new-style classes, The “New Style” Class Model–Other Class Changes and Extensions
- operator overloading, Operator Overloading, Operator Overloading–Test Your Knowledge: Answers
- polymorphism and, Polymorphism Means Interfaces, Not Call Signatures
- pseudoprivate class attributes, Pseudoprivate Class Attributes–Why 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 Example–Test Your Knowledge: Answers
- state information, Using State Information in Descriptors
- static and class methods, Static and Class Methods–Counting 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 Example–Returning results, or not, Why Use Operator Overloading?, Step 3: Operator Overloading–Providing Print Displays, The Basics, Constructors and Expressions: __init__ and __sub__, Common Operator Overloading Methods–Common 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 Others–The __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 classes–Overloading 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 Methods–Common Operator Overloading Methods
- comparisons and, Comparisons: __lt__, __gt__, and Others–The __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 classes–Overloading 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 Example–Returning results, or not, Step 3: Operator Overloading–Providing Print Displays
- validating methods, Should operator methods be validated?
- operator precedence, Mixed operators follow operator precedence
- optimizing objects, Execution Optimization Tools–Psyco: 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 Tools–Psyco: 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