L
- lambda expressions, Python Expression Operators, Handling larger actions, Coding Functions, Scope Details, Name Resolution: The LEGB Rule, Nested scopes, defaults, and lambdas, Nested scopes, defaults, and lambdas, Loop variables may require defaults, not scopes, Simulating Output Parameters and Multiple Results, Anonymous Functions: lambda–How (Not) to Obfuscate Your Python Code, Multiway branch switches: The finale, How (Not) to Obfuscate Your Python Code–How (Not) to Obfuscate Your Python Code, Scopes: lambdas Can Be Nested Too, Scopes: lambdas Can Be Nested Too, Scopes: lambdas Can Be Nested Too, Function Interfaces and Callback-Based Code
-
- about, Nested scopes, defaults, and lambdas, Anonymous Functions: lambda–How (Not) to Obfuscate Your Python Code
- callbacks and, Function Interfaces and Callback-Based Code
- coding functions, Coding Functions, How (Not) to Obfuscate Your Python Code–How (Not) to Obfuscate Your Python Code
- def statement and, Nested scopes, defaults, and lambdas
- inline callbacks, Scopes: lambdas Can Be Nested Too
- multiway branching and, Handling larger actions, Multiway branch switches: The finale
- nesting, Loop variables may require defaults, not scopes, Scopes: lambdas Can Be Nested Too
- scope and, Scope Details, Name Resolution: The LEGB Rule, Scopes: lambdas Can Be Nested Too
- unpacking arguments, Simulating Output Parameters and Multiple Results
- usage example, Python Expression Operators
- language features, enabling in modules, Enabling Future Language Features: __future__
- last-in-first-out (LIFO), Other common list methods, Recursion versus queues and stacks
- Latin-1 character set, Character Encoding Schemes
- __le__ method, Common Operator Overloading Methods
- left-shift (<<) operator, Character code conversions
- LEGB rule, Name Resolution: The LEGB Rule–Other Python scopes: Preview, The Built-in Scope, Simple Names: Global Unless Assigned, Nested Classes: The LEGB Scopes Rule Revisited–Nested Classes: The LEGB Scopes Rule Revisited
-
- built-in scope and, The Built-in Scope
- name resolution, Name Resolution: The LEGB Rule–Other Python scopes: Preview
- namespaces and, Simple Names: Global Unless Assigned
- nested classes, Nested Classes: The LEGB Scopes Rule Revisited–Nested Classes: The LEGB Scopes Rule Revisited
- len built-in function, Numbers, Escape Sequences Represent Special Characters, Raw Strings Suppress Escapes, Basic Operations, Basic Dictionary Operations, Sequence Shufflers: range and len, How Python Stores Strings in Memory
-
- dictionaries and, Basic Dictionary Operations
- sequence shufflers, Sequence Shufflers: range and len
- strings, Numbers
- strings and, Escape Sequences Represent Special Characters, Raw Strings Suppress Escapes, Basic Operations, How Python Stores Strings in Memory
- __len__ method, Common Operator Overloading Methods, Boolean Tests: __bool__ and __len__–Boolean Methods in Python 2.X
- lexical scoping, Python Scope Basics
- LIFO (last-in-first-out), Other common list methods, Recursion versus queues and stacks
- Linux platform, GUIs, Introducing the Python Interpreter, Frozen Binaries, Starting an Interactive Session, Where to Run: Code Directories, Icon-Click Basics, IDLE Startup Details, Installation Steps, Unix/Linux shell variables
-
- configuring Python, Unix/Linux shell variables
- frozen binaries and, Frozen Binaries
- GUI support, GUIs
- icon clicks, Icon-Click Basics
- IDLE startup details, IDLE Startup Details
- installing Python, Introducing the Python Interpreter, Installation Steps
- system shell prompt, Starting an Interactive Session
- working directory, Where to Run: Code Directories
- list built-in function, String Method Examples: Changing Strings II, Dictionary views in 3.X (and 2.7 via new methods), Conversions, methods, and immutability, Type Objects, Other Built-in Type Iterables, Other Iteration Contexts, Other Iteration Contexts, Impacts on 2.X Code: Pros and Cons, Dictionary View Iterables
-
- about, String Method Examples: Changing Strings II
- converting objects to lists, Conversions, methods, and immutability
- iteration protocol and, Dictionary views in 3.X (and 2.7 via new methods), Other Built-in Type Iterables, Other Iteration Contexts, Other Iteration Contexts, Impacts on 2.X Code: Pros and Cons, Dictionary View Iterables
- type customization and, Type Objects
- list comprehensions, Comprehensions–Comprehensions, Comprehensions, Comprehensions, Comprehensions, List Iteration and Comprehensions, List Iteration and Comprehensions, Nested for loops, Changing Lists: range Versus Comprehensions, Iterations and Comprehensions, List Comprehensions: A First Detailed Look–List Comprehension Basics, List Comprehensions: A First Detailed Look, Using List Comprehensions on Files, Extended List Comprehension Syntax–Nested loops: for, Other Iteration Topics, List Comprehensions and Functional Tools–On the other hand: performance, conciseness, expressiveness, List Comprehensions and Functional Tools, List Comprehensions Versus map, Adding Tests and Nested Loops: filter–Formal comprehension syntax, Example: List Comprehensions and Matrixes–Example: List Comprehensions and Matrixes, Don’t Abuse List Comprehensions: KISS–On the other hand: performance, conciseness, expressiveness, On the other hand: performance, conciseness, expressiveness
-
- about, Comprehensions–Comprehensions, List Comprehensions: A First Detailed Look–List Comprehension Basics, List Comprehensions and Functional Tools
- extended syntax, Extended List Comprehension Syntax–Nested loops: for
- files and, Using List Comprehensions on Files
- filter built-in function and, Comprehensions, Adding Tests and Nested Loops: filter–Formal comprehension syntax
- for statement and, Nested for loops, Iterations and Comprehensions, List Comprehensions: A First Detailed Look
- functional tools, List Comprehensions and Functional Tools–On the other hand: performance, conciseness, expressiveness
- generator expressions and, Other Iteration Topics
- map built-in function versus, Comprehensions, List Iteration and Comprehensions, List Comprehensions Versus map, On the other hand: performance, conciseness, expressiveness
- matrixes and, Example: List Comprehensions and Matrixes–Example: List Comprehensions and Matrixes
- range built-in function and, Comprehensions, List Iteration and Comprehensions, Changing Lists: range Versus Comprehensions
- usage considerations, Don’t Abuse List Comprehensions: KISS–On the other hand: performance, conciseness, expressiveness
- list-unpacking assignments, Assignment Statement Forms
- lists (list object), Python’s Core Data Types, Python’s Core Data Types, Lists, Lists, Sequence Operations, Type-Specific Operations, Type-Specific Operations, Type-Specific Operations, Type-Specific Operations, Type-Specific Operations, Type-Specific Operations, Type-Specific Operations, Type-Specific Operations, Bounds Checking, Nesting, Sorting Keys: for Loops, Lists, Lists–Lists, Lists, Lists, Lists, Basic List Operations, Basic List Operations, Basic List Operations, List Iteration and Comprehensions, Indexing, Slicing, and Matrixes, Indexing, Slicing, and Matrixes, Indexing, Slicing, and Matrixes, Indexing, Slicing, and Matrixes, Indexing, Slicing, and Matrixes, Changing Lists in Place–Other common list operations, Index and slice assignments–Index and slice assignments, Index and slice assignments–Index and slice assignments, Index and slice assignments, Index and slice assignments, Index and slice assignments, Index and slice assignments, List method calls–Other common list methods, List method calls, More on sorting lists–More on sorting lists, More on sorting lists, More on sorting lists, Other common list methods, Other common list methods, Other common list methods, Other common list methods, Other common list methods, Other common list methods, Other common list methods, Other common list methods, Other common list operations, Other common list operations, Other common list operations, Using dictionaries to simulate flexible lists: Integer keys, Other Ways to Make Dictionaries, Test Your Knowledge: Quiz, Why Lists and Tuples?, References Versus Copies, Comparisons, Equality, and Truth, Advanced sequence assignment patterns, Advanced sequence assignment patterns, Expression Statements and In-Place Changes, Other Iteration Contexts, Other Iteration Contexts, Example: Catching Built-in Exceptions
-
- about, Python’s Core Data Types, Lists, Lists–Lists
- append method, Type-Specific Operations, List method calls, More on sorting lists, Other common list methods, Advanced sequence assignment patterns, Other Iteration Contexts
- bounds checking, Bounds Checking
- changing in place, Changing Lists in Place–Other common list operations, Expression Statements and In-Place Changes
- common operations, Lists, Basic List Operations, Other common list operations
- comparison operations, Comparisons, Equality, and Truth
- concatenating, Basic List Operations, Example: Catching Built-in Exceptions
- copy method, Other common list operations, References Versus Copies
- count method, Other common list methods
- deleting items, Other common list operations
- dictionaries versus, Using dictionaries to simulate flexible lists: Integer keys, Other Ways to Make Dictionaries
- empty lists, Lists
- extend method, Type-Specific Operations, Index and slice assignments, Other common list methods, Other Iteration Contexts
- index method, Other common list methods
- indexing, Indexing, Slicing, and Matrixes, Index and slice assignments–Index and slice assignments
- insert method, Type-Specific Operations, Index and slice assignments, Other common list methods
- iteration in, List Iteration and Comprehensions
- literals, Python’s Core Data Types, Lists
- matrixes and, Indexing, Slicing, and Matrixes
- mutable nature of, Lists, Lists
- nesting, Nesting, Indexing, Slicing, and Matrixes
- pop method, Type-Specific Operations, Index and slice assignments, Other common list methods, Advanced sequence assignment patterns
- quiz questions and answers, Test Your Knowledge: Quiz
- remove method, Type-Specific Operations, Index and slice assignments, Other common list methods
- repeating, Basic List Operations
- reverse method, Type-Specific Operations, More on sorting lists, Other common list methods
- sequence operations, Sequence Operations, Indexing, Slicing, and Matrixes
- slicing, Indexing, Slicing, and Matrixes, Index and slice assignments–Index and slice assignments
- sort method, Type-Specific Operations, Sorting Keys: for Loops, More on sorting lists–More on sorting lists
- tuples versus, Why Lists and Tuples?
- type-specific methods, List method calls–Other common list methods
- type-specific operations, Type-Specific Operations
- literals, Python’s Core Data Types, Python’s Core Data Types, Python’s Core Data Types, Python’s Core Data Types, Python’s Core Data Types, Python’s Core Data Types, Python’s Core Data Types, Python’s Core Data Types, Python’s Core Data Types, Unicode Strings, Numeric Literals–Numeric Literals, Numeric Literals, Hex, Octal, Binary: Literals and Conversions–Hex, Octal, Binary: Literals and Conversions, Hex, Octal, Binary: Literals and Conversions–Hex, Octal, Binary: Literals and Conversions, Set literals in Python 3.X and 2.7, Unicode: The Short Story, String Basics–Triple Quotes Code Multiline Block Strings, Lists, Dictionaries, Tuples, Statement Delimiters: Lines and Continuations, Python 3.X String Literals–Python 2.X String Literals, Python 2.X Unicode literals in Python 3.3, Byte String Literals: Encoded Text
-
- about, Python’s Core Data Types
- built-in object type examples, Python’s Core Data Types
- byte string, Byte String Literals: Encoded Text
- dictionary, Python’s Core Data Types, Dictionaries
- file, Python’s Core Data Types
- hex, octal, binary notation, Hex, Octal, Binary: Literals and Conversions–Hex, Octal, Binary: Literals and Conversions
- integer objects, Numeric Literals, Hex, Octal, Binary: Literals and Conversions–Hex, Octal, Binary: Literals and Conversions
- list, Python’s Core Data Types, Lists
- numeric, Python’s Core Data Types, Numeric Literals–Numeric Literals
- set, Python’s Core Data Types, Set literals in Python 3.X and 2.7
- string, Python’s Core Data Types, String Basics–Triple Quotes Code Multiline Block Strings, Statement Delimiters: Lines and Continuations, Python 3.X String Literals–Python 2.X String Literals
- tuple, Python’s Core Data Types, Tuples
- Unicode, Unicode Strings, Unicode: The Short Story, Python 2.X Unicode literals in Python 3.3
- little-endian format, Handling the BOM in 3.X–Dropping the BOM in Python
- local scope, Scope Details, Name Resolution: The LEGB Rule, Other Python scopes: Preview, Simple Names: Global Unless Assigned
-
- about, Scope Details
- class statement and, Other Python scopes: Preview
- LEGB rule and, Name Resolution: The LEGB Rule, Simple Names: Global Unless Assigned
- local variables, Local Variables
- logical operations, Python Expression Operators
- LookupError class, Built-in Exception Classes
- loops, A Quick Example: Interactive Loops–Nesting Code Three Levels Deep, A Quick Example: Interactive Loops, break, continue, pass, and the Loop else, Loop else–More on the loop else, Loop Coding Techniques–Generating Both Offsets and Items: enumerate, Loop Coding Techniques–Generating Both Offsets and Items: enumerate, Test Your Knowledge: Quiz, Iterations: A First Look–Other Built-in Type Iterables, Filter clauses: if–Nested loops: for, Loop variables may require defaults, not scopes, Loop Statements Versus Recursion, Adding Tests and Nested Loops: filter–Formal comprehension syntax, Enclosing scopes and loop variables: Factory functions, Breaking Out of Multiple Nested Loops: “go to”, Breaking Out of Multiple Nested Loops: “go to”, Avoiding loops in attribute interception methods
-
- (see also specific statements)
- attribute interception methods and, Avoiding loops in attribute interception methods
- breaking out of, Breaking Out of Multiple Nested Loops: “go to”
- coding techniques for, Loop Coding Techniques–Generating Both Offsets and Items: enumerate
- else clause, break, continue, pass, and the Loop else, Loop else–More on the loop else
- function-related gotchas, Enclosing scopes and loop variables: Factory functions
- interactive, A Quick Example: Interactive Loops–Nesting Code Three Levels Deep
- iterations and, Loop Coding Techniques–Generating Both Offsets and Items: enumerate, Iterations: A First Look–Other Built-in Type Iterables
- nesting, Filter clauses: if–Nested loops: for, Loop variables may require defaults, not scopes, Adding Tests and Nested Loops: filter–Formal comprehension syntax, Breaking Out of Multiple Nested Loops: “go to”
- quiz questions and answers, Test Your Knowledge: Quiz
- recursion versus, Loop Statements Versus Recursion
- __lt__ method, Common Operator Overloading Methods, Comparisons: __lt__, __gt__, and Others