E
- Easter eggs, Software Quality
- EBCDIC encoding, Other Encoding Schemes
- Eclipse IDE, Other IDEs
- EIBTI acronym, Don’t Abuse Generators: EIBTI–On the other hand: Space and time, conciseness, expressiveness
- ElementTree package, XML Parsing Tools, XML Parsing Tools
- else clause (loop blocks), break, continue, pass, and the Loop else, Loop else–More on the loop else
- embedded programs, Embedding Calls
- empty data structures, The Meaning of True and False in Python
- empty dictionaries, Dictionaries
- empty lists, Lists
- empty strings, String Basics
- empty tuples, Tuples
- encapsulation, Polymorphism and classes, Python and OOP, Why Decorators? (Revisited)
-
- about, Python and OOP
- decorators and, Why Decorators? (Revisited)
- polymorphism and, Polymorphism and classes
- enclosing scope, Scope Details, Name Resolution: The LEGB Rule, Retaining Enclosing Scope State with Defaults–Arbitrary scope nesting, Enclosing scopes and loop variables: Factory functions, Function Interfaces and Callback-Based Code, Enclosing scopes and globals–Enclosing scopes and nonlocals, Coding alternatives, State retention and enclosing scopes
-
- about, Scope Details
- function-related gotchas, Enclosing scopes and loop variables: Factory functions
- LEGB rule and, Name Resolution: The LEGB Rule
- nonlocal statement and, Function Interfaces and Callback-Based Code, Enclosing scopes and globals–Enclosing scopes and nonlocals, Coding alternatives
- retaining state with defaults, Retaining Enclosing Scope State with Defaults–Arbitrary scope nesting
- state retention and, State retention and enclosing scopes
- encoding and decoding, Binary Bytes Files, Unicode: The Short Story, String Basics, Escape Sequences Represent Special Characters, Character Encoding Schemes–Character Encoding Schemes, Coding Unicode Strings–Source File Character Set Encoding Declarations, Coding ASCII Text, Coding Non-ASCII Text–Encoding and Decoding Non-ASCII text, Other Encoding Schemes, Other Encoding Schemes, Byte String Literals: Encoded Text, Converting Encodings, Source File Character Set Encoding Declarations–Source File Character Set Encoding Declarations, Using Unicode Files–Stream content: PYTHONIOENCODING, Unicode Filenames and Streams
-
- about, Character Encoding Schemes–Character Encoding Schemes
- additional schemes, Other Encoding Schemes
- ASCII, Escape Sequences Represent Special Characters, Coding ASCII Text
- byte string literals, Byte String Literals: Encoded Text
- character set declarations, Source File Character Set Encoding Declarations–Source File Character Set Encoding Declarations
- converting, Converting Encodings
- EBCDIC, Other Encoding Schemes
- filenames, Unicode Filenames and Streams
- non-ASCII text, Coding Non-ASCII Text–Encoding and Decoding Non-ASCII text
- Unicode, Binary Bytes Files, Unicode: The Short Story, String Basics, Coding Unicode Strings–Source File Character Set Encoding Declarations, Using Unicode Files–Stream content: PYTHONIOENCODING
- encodings module, Character Encoding Schemes
- endianness, Handling the BOM in 3.X–Dropping the BOM in Python
- __enter__ method, Common Operator Overloading Methods, The Context Management Protocol
- enumerate built-in function, Loop Coding Techniques, Generating Both Offsets and Items: enumerate, Other Built-in Type Iterables, Other Iteration Contexts
-
- about, Loop Coding Techniques, Generating Both Offsets and Items: enumerate
- iteration and, Other Iteration Contexts
- usage example, Other Built-in Type Iterables
- env program, The Unix env Lookup Trick
- environment variables, The System Path, New Windows Options in 3.3: PATH, Launcher, Command-Line Usage Variations, The Unix env Lookup Trick, The Python 3.3 Windows Launcher: #! Comes to Windows, Usage Notes: import and reload, Python 3.2 and earlier: GUI client, The Module Search Path, Packages and Search Path Settings, Changing the Module Search Path, Stream content: PYTHONIOENCODING, Python Environment Variables–Python Environment Variables, Python Environment Variables, Python Environment Variables, Python Environment Variables, Python Environment Variables, Python Environment Variables, Python Environment Variables, Python Environment Variables, Python Environment Variables, Python Environment Variables, Python Environment Variables, Python Environment Variables, Python Environment Variables, Python Environment Variables, Python Environment Variables, Windows environment variable GUI
-
- about, Python Environment Variables–Python Environment Variables
- PATH, The System Path, New Windows Options in 3.3: PATH, Launcher, Command-Line Usage Variations, The Unix env Lookup Trick, Python Environment Variables, Python Environment Variables
- PYTHONIOENCODING, Stream content: PYTHONIOENCODING
- PYTHONPATH, Usage Notes: import and reload, Python 3.2 and earlier: GUI client, The Module Search Path, Packages and Search Path Settings, Changing the Module Search Path, Python Environment Variables, Python Environment Variables, Windows environment variable GUI
- PYTHONSTARTUP, Python Environment Variables, Python Environment Variables
- PY_PYTHON, The Python 3.3 Windows Launcher: #! Comes to Windows, Python Environment Variables, Python Environment Variables
- PY_PYTHON2, Python Environment Variables, Python Environment Variables
- PY_PYTHON3, Python Environment Variables, Python Environment Variables
- TCL_LIBRARY, Python Environment Variables
- TK_LIBRARY, Python Environment Variables
- EOFError exception, Exceptions Aren’t Always Errors
- __eq__ method, Common Operator Overloading Methods, Comparisons: __lt__, __gt__, and Others
- equality, Python Expression Operators, Shared References and Equality–Shared References and Equality, Comparisons, Equality, and Truth–Python 2.X and 3.X dictionary comparisons, Truth Values and Boolean Tests–Truth Values and Boolean Tests
-
- built-in object types, Comparisons, Equality, and Truth–Python 2.X and 3.X dictionary comparisons
- shared references and, Shared References and Equality–Shared References and Equality
- testing truth values, Truth Values and Boolean Tests–Truth Values and Boolean Tests
- value equality operators, Python Expression Operators
- equivalence (==) operator, Comparisons, Equality, and Truth
- errno module, Built-in Exception Categories
- error handling, Other Icon-Click Limitations, Missing Keys: if Tests–Missing Keys: if Tests, Avoiding missing-key errors, Handling Errors by Testing Inputs, Handling Errors with try Statements–Supporting floating-point numbers, Exception Roles, Termination Actions, Displaying Errors and Tracebacks
-
- displaying errors and tracebacks, Displaying Errors and Tracebacks
- exceptions and, Exception Roles, Termination Actions
- missing keys, Missing Keys: if Tests–Missing Keys: if Tests, Avoiding missing-key errors
- scripts and, Other Icon-Click Limitations
- testing inputs, Handling Errors by Testing Inputs
- with try statements, Handling Errors with try Statements–Supporting floating-point numbers
- escape sequences, Other Ways to Code Strings, String Basics, Escape Sequences Represent Special Characters–Raw Strings Suppress Escapes
- etree package, XML Parsing Tools
- eval built-in function, Hex, Octal, Binary: Literals and Conversions, String Conversion Tools, Storing Python Objects in Files: Conversions, Multiway branch switches: The finale
-
- jump tables and, Multiway branch switches: The finale
- strings and, Hex, Octal, Binary: Literals and Conversions, String Conversion Tools, Storing Python Objects in Files: Conversions
- event notification, Exception Roles
- Exception class, User-Defined Exceptions, Catching all: The empty except and Exception, Coding Exceptions Classes, Built-in Exception Classes, Built-in Exception Categories, More on sys.exc_info
-
- about, Coding Exceptions Classes, Built-in Exception Classes
- as catchall, Catching all: The empty except and Exception, Built-in Exception Categories, More on sys.exc_info
- user-defined exceptions and, User-Defined Exceptions
- exception classes, Exception Objects–Class-Based Exceptions, Exception Objects, Coding Exceptions Classes–Coding Exceptions Classes, Why Exception Hierarchies?–Why Exception Hierarchies?, Built-in Exception Classes–Default Printing and State, Custom Print Displays, Custom Data and Behavior–Providing Exception Methods, Test Your Knowledge: Quiz
-
- about, Exception Objects–Class-Based Exceptions
- built-in, Built-in Exception Classes–Default Printing and State
- coding, Coding Exceptions Classes–Coding Exceptions Classes
- custom data and behavior, Custom Data and Behavior–Providing Exception Methods
- custom print displays, Custom Print Displays
- hierarchies in, Why Exception Hierarchies?–Why Exception Hierarchies?
- quiz questions and answers, Test Your Knowledge: Quiz
- version considerations, Exception Objects
- exception handlers, Why Use Exceptions?, Why Use Exceptions?, Exception Roles, Default Exception Handler, Default Exception Handler, Catching Exceptions, Termination Actions, Providing Exception Methods–Providing Exception Methods, Nesting Exception Handlers–Example: Syntactic Nesting
-
- (see also specific statements)
- about, Why Use Exceptions?
- backtracking and, Exception Roles
- default, Default Exception Handler
- defining methods for, Providing Exception Methods–Providing Exception Methods
- interactive prompt and, Catching Exceptions
- nesting, Nesting Exception Handlers–Example: Syntactic Nesting
- termination actions and, Default Exception Handler, Termination Actions
- exception variables, Other Python scopes: Preview
- exceptions, Using Keyword-Only Arguments, User-Defined Iterables, Exception Basics, Exception Basics, Why Use Exceptions?, Exception Roles, Catching Exceptions, Raising Exceptions, User-Defined Exceptions, User-Defined Exceptions, Termination Actions, Test Your Knowledge: Quiz, Exception Coding Details–Test Your Knowledge: Answers, Catching any and all exceptions–Catching all: The empty except and Exception, Example: Catching Built-in Exceptions, Example: Catching Built-in Exceptions, Raising Exceptions, Propagating Exceptions with raise, Python 3.X Exception Chaining: raise from–Python 3.X Exception Chaining: raise from, Test Your Knowledge: Quiz, Exception Objects–Test Your Knowledge: Answers, String Exceptions Are Right Out!, Default Printing and State, Exception Idioms–Displaying Errors and Tracebacks, Exceptions Aren’t Always Errors, Functions Can Signal Conditions with raise, Exception Design Tips and Gotchas–Catching Too Little: Use Class-Based Categories, Catching Too Much: Avoid Empty except and Exception–Catching Too Much: Avoid Empty except and Exception, Catching Too Little: Use Class-Based Categories, Test Your Knowledge: Quiz
-
- (see also specific exceptions and specific statements)
- about, Exception Basics
- built-in, User-Defined Exceptions, Example: Catching Built-in Exceptions
- catching, Catching Exceptions, Termination Actions, Catching any and all exceptions–Catching all: The empty except and Exception, Example: Catching Built-in Exceptions
- catching too little, Catching Too Little: Use Class-Based Categories
- catching too much, Catching Too Much: Avoid Empty except and Exception–Catching Too Much: Avoid Empty except and Exception
- chaining, Python 3.X Exception Chaining: raise from–Python 3.X Exception Chaining: raise from
- class-based, Exception Objects–Test Your Knowledge: Answers
- coding details, Exception Coding Details–Test Your Knowledge: Answers
- common roles, Exception Roles
- design tips and gotchas, Exception Design Tips and Gotchas–Catching Too Little: Use Class-Based Categories
- errors versus, Exceptions Aren’t Always Errors
- propagating, Propagating Exceptions with raise
- quiz questions and answers, Test Your Knowledge: Quiz, Test Your Knowledge: Quiz, Test Your Knowledge: Quiz
- raising, Using Keyword-Only Arguments, User-Defined Iterables, Raising Exceptions, Raising Exceptions
- string-based, String Exceptions Are Right Out!
- usage considerations, Why Use Exceptions?, Exception Idioms–Displaying Errors and Tracebacks
- user-defined, User-Defined Exceptions, Default Printing and State, Functions Can Signal Conditions with raise
- exceptions module, Built-in Exception Classes
- exec built-in function, Using exec to Run Module Files–Using exec to Run Module Files
- execfile built-in function, Using exec to Run Module Files
- executable scripts, Unix Script Basics, The Unix env Lookup Trick, The Python 3.3 Windows Launcher: #! Comes to Windows–The Python 3.3 Windows Launcher: #! Comes to Windows
-
- #! comment in Windows, The Python 3.3 Windows Launcher: #! Comes to Windows–The Python 3.3 Windows Launcher: #! Comes to Windows
- about, Unix Script Basics
- env program, The Unix env Lookup Trick
- executing programs, How Python Runs Programs (see program execution)
- exercises, Test Your Knowledge: Part I Exercises–Test Your Knowledge: Part I Exercises, Test Your Knowledge: Part II Exercises–Test Your Knowledge: Part II Exercises, Test Your Knowledge: Part III Exercises–Test Your Knowledge: Part III Exercises, Test Your Knowledge: Part IV Exercises–Test Your Knowledge: Part IV Exercises, Test Your Knowledge: Part V Exercises–Test Your Knowledge: Part V Exercises, Test Your Knowledge: Part VI Exercises–Test Your Knowledge: Part VI Exercises, Test Your Knowledge: Part VII Exercises, Part I, Getting Started–Part I, Getting Started, Part II, Types and Operations–Part II, Types and Operations, Part III, Statements and Syntax–Part III, Statements and Syntax, Part IV, Functions and Generators–Part IV, Functions and Generators, Part V, Modules and Packages–Part V, Modules and Packages, Part VI, Classes and OOP–Part VI, Classes and OOP, Part VII, Exceptions and Tools–Part VII, Exceptions and Tools
-
- part I, Test Your Knowledge: Part I Exercises–Test Your Knowledge: Part I Exercises, Part I, Getting Started–Part I, Getting Started
- part II, Test Your Knowledge: Part II Exercises–Test Your Knowledge: Part II Exercises, Part II, Types and Operations–Part II, Types and Operations
- part III, Test Your Knowledge: Part III Exercises–Test Your Knowledge: Part III Exercises, Part III, Statements and Syntax–Part III, Statements and Syntax
- part IV, Test Your Knowledge: Part IV Exercises–Test Your Knowledge: Part IV Exercises, Part IV, Functions and Generators–Part IV, Functions and Generators
- part V, Test Your Knowledge: Part V Exercises–Test Your Knowledge: Part V Exercises, Part V, Modules and Packages–Part V, Modules and Packages
- part VI, Test Your Knowledge: Part VI Exercises–Test Your Knowledge: Part VI Exercises, Part VI, Classes and OOP–Part VI, Classes and OOP
- part VII, Test Your Knowledge: Part VII Exercises, Part VII, Exceptions and Tools–Part VII, Exceptions and Tools
- __exit__ method, Common Operator Overloading Methods, The Context Management Protocol
- explicit attributes, State with Classes: Explicit Attributes (Preview)
- exponentiation operation, Numbers
- expression operators, Python Expression Operators, Python Expression Operators, Mixed operators follow operator precedence, Parentheses group subexpressions, Mixed types are converted up, Preview: Operator overloading and polymorphism, Preview: Operator overloading and polymorphism, Set basics in Python 2.6 and earlier
-
- converting mixed types, Mixed types are converted up
- grouping with parentheses, Parentheses group subexpressions
- listed, Python Expression Operators
- operator overloading, Preview: Operator overloading and polymorphism
- operator precedence, Mixed operators follow operator precedence
- polymorphism and, Preview: Operator overloading and polymorphism
- set operations and, Set basics in Python 2.6 and earlier
- version considerations, Python Expression Operators
- expressions, Running Code Interactively, The Python Conceptual Hierarchy, The Python Conceptual Hierarchy, Sequence Operations, Sequence Operations, Python Expression Operators, Python Expression Operators–Preview: Operator overloading and polymorphism, Python Expression Operators, Variables and Basic Expressions–Variables and Basic Expressions, Variables, Objects, and References, Method Call Syntax, String Formatting Expressions–Dictionary-Based Formatting Expressions, Functions versus expressions: A minor convenience, Expression Statements–Expression Statements and In-Place Changes, Expression Statements, Test Your Knowledge: Quiz, Multiple Versus Single Pass Iterators, Other Iteration Topics, Generator Functions and Expressions, Generator Expressions: Iterables Meet Comprehensions–Generator Functions Versus Generator Expressions, Constructors and Expressions: __init__ and __sub__, Intercepting Slices, Call Expressions: __call__–Function Interfaces and Callback-Based Code
-
- (see also lambda expressions)
- about, Python Expression Operators
- arbitrary, Sequence Operations
- call, Method Call Syntax, Call Expressions: __call__–Function Interfaces and Callback-Based Code
- code examples, Running Code Interactively
- expression operators, Python Expression Operators–Preview: Operator overloading and polymorphism
- functions versus, Functions versus expressions: A minor convenience, Expression Statements
- generator, Multiple Versus Single Pass Iterators, Other Iteration Topics, Generator Functions and Expressions, Generator Expressions: Iterables Meet Comprehensions–Generator Functions Versus Generator Expressions
- indexing, Sequence Operations
- numbers in, Variables and Basic Expressions–Variables and Basic Expressions
- objects and, The Python Conceptual Hierarchy
- operator overloading and, Constructors and Expressions: __init__ and __sub__
- quiz questions and answers, Test Your Knowledge: Quiz
- slice, Intercepting Slices
- statements and, The Python Conceptual Hierarchy, Expression Statements–Expression Statements and In-Place Changes
- string formatting, String Formatting Expressions–Dictionary-Based Formatting Expressions
- variables and, Variables, Objects, and 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
-
- about, Assignment Statement Forms, Extended Sequence Unpacking in Python 3.X–Application to for loops
- for loops and, Python 3.X extended sequence assignment in for loops
- extending built-in types, Extending Built-in Types, Extending Types by Embedding, Extending Types by Subclassing–Extending Types by Subclassing
-
- about, Extending Built-in Types
- by embedding, Extending Types by Embedding
- by subclassing, Extending Types by Subclassing–Extending Types by Subclassing
- extension modules, Other Kinds of Modules