T
- -t command-line flag, Avoid mixing tabs and spaces: New error checking in 3.X
- tabs versus spaces, Avoid mixing tabs and spaces: New error checking in 3.X
- TCL_LIBRARY environment variable, Python Environment Variables
- termination actions, Exception Roles, Exception Roles, Exception Roles, Default Exception Handler, Termination Actions–Termination Actions, Termination Actions–Termination Actions, Termination Actions, The try/finally Statement–Example: Coding Termination Actions with try/finally, What Should Be Wrapped, What Should Be Wrapped
-
- about, Exception Roles, Termination Actions–Termination Actions
- default exception handler and, Default Exception Handler
- try/finally statement and, Exception Roles, Termination Actions–Termination Actions, The try/finally Statement–Example: Coding Termination Actions with try/finally, What Should Be Wrapped
- with/as statement and, Exception Roles, Termination Actions, What Should Be Wrapped
- testing, Testing, Missing Keys: if Tests, Booleans, The bool type, Handling Errors by Testing Inputs–Supporting floating-point numbers, Truth Values and Boolean Tests–Truth Values and Boolean Tests, Filter clauses: if, Adding Tests and Nested Loops: filter–Formal comprehension syntax, Unit Tests with __name__, Testing reload variants, reload, from, and Interactive Testing, Testing As You Go–Testing As You Go, Boolean Tests: __bool__ and __len__–Boolean Methods in Python 2.X, New-Style Class Changes, Type Model Changes–Implications for type testing, Running In-Process Tests, Testing subtleties, A Basic Range-Testing Decorator for Positional Arguments–Other Applications: Type Testing (If You Insist!), Other Applications: Type Testing (If You Insist!)
-
- error handling, Handling Errors by Testing Inputs–Supporting floating-point numbers
- filtering results, Filter clauses: if
- from statement and, reload, from, and Interactive Testing
- interactive prompt and, Testing
- list comprehensions and, Adding Tests and Nested Loops: filter–Formal comprehension syntax
- for missing keys, Missing Keys: if Tests
- with __name__ attribute, Unit Tests with __name__
- for positional arguments, A Basic Range-Testing Decorator for Positional Arguments–Other Applications: Type Testing (If You Insist!)
- processes, Testing As You Go–Testing As You Go, Running In-Process Tests
- reloading variants, Testing reload variants
- timing calls example, Testing subtleties
- truth values, Booleans, The bool type, Truth Values and Boolean Tests–Truth Values and Boolean Tests, Boolean Tests: __bool__ and __len__–Boolean Methods in Python 2.X
- type, New-Style Class Changes, Type Model Changes–Implications for type testing, Other Applications: Type Testing (If You Insist!)
- text editor launch options, Text Editor Launch Options
- text files, Unicode Strings, Files, Binary Bytes Files, Unicode Text Files–Unicode Text Files, Unicode: The Short Story, Text and Binary Files: The Short Story, Currency Symbols: Unicode in Action–Currency Symbols: Unicode in Action, Text and Binary Files–Text and Binary Files, Using Text and Binary Files, Text and Binary Modes in 2.X and 3.X
-
- about, Unicode Strings, Text and Binary Files–Text and Binary Files, Using Text and Binary Files
- binary files and, Binary Bytes Files
- creating, Files
- Unicode, Unicode Text Files–Unicode Text Files, Unicode: The Short Story, Currency Symbols: Unicode in Action–Currency Symbols: Unicode in Action
- version considerations, Text and Binary Files: The Short Story, Text and Binary Modes in 2.X and 3.X
- _thread module, Program Design: Minimize Global Variables
- threading module, Program Design: Minimize Global Variables
- 3to2 converter, 2to3 converter
- time module, Iteration and Optimization, Full Credit, Timing Module: Homegrown, Timing Module: Homegrown, Timing Module: Homegrown, Timing Module: Homegrown, Timing Module: Homegrown, Timing Module: Homegrown, Timing Module: Homegrown, Command-line usage, Decorators versus per-call timing, Decorators versus per-call timing
-
- about, Iteration and Optimization, Full Credit
- clock function, Timing Module: Homegrown, Timing Module: Homegrown, Command-line usage, Decorators versus per-call timing
- homegrown timing module and, Timing Module: Homegrown
- perf_counter function, Timing Module: Homegrown, Decorators versus per-call timing
- process_time function, Timing Module: Homegrown
- time function, Timing Module: Homegrown, Timing Module: Homegrown
- timeit module, Iteration and Optimization, Full Credit, Other Suggestions, Timing Iterations and Pythons with timeit–Other usage modes: Setup, totals, and objects, Interactive usage and API calls, Other usage modes: Setup, totals, and objects, Benchmark Module and Script: timeit–Benchmark Script Results, Room for improvement: Setup, Common Operator Overloading Methods, What about slots speed?, Decorators versus per-call timing, Running modules on the search path, Part IV, Functions and Generators
-
- about, Iteration and Optimization, Full Credit, Other Suggestions, Timing Iterations and Pythons with timeit–Other usage modes: Setup, totals, and objects
- benchmark and script, Benchmark Module and Script: timeit–Benchmark Script Results
- other examples, Common Operator Overloading Methods, What about slots speed?, Decorators versus per-call timing, Running modules on the search path, Part IV, Functions and Generators
- repeat function, Interactive usage and API calls
- setup code, Other usage modes: Setup, totals, and objects, Room for improvement: Setup
- timestamps in source code, Byte code compilation
- timing calls with function decorators, Timing Calls–Timing with decorator arguments
- timing iterations, Timing Iteration Alternatives–Other Suggestions, Timing Iterations and Pythons with timeit–Room for improvement: Setup
-
- alternatives for, Timing Iteration Alternatives–Other Suggestions
- timeit module, Timing Iterations and Pythons with timeit–Room for improvement: Setup
- timsort algorithm, Full Credit
- tkinter GUI toolkit, GUIs, IDLE Startup Details, Usage Notes: IDLE, Usage Notes: IDLE, Using Keyword-Only Arguments, Scopes: lambdas Can Be Nested Too, Testing reload variants, Function Interfaces and Callback-Based Code, Other callables, Python Environment Variables
-
- about, GUIs
- callbacks and, Function Interfaces and Callback-Based Code, Other callables
- common usage mistakes, Usage Notes: IDLE
- configuring Python and, Python Environment Variables
- IDLE and, IDLE Startup Details
- keyword arguments and, Using Keyword-Only Arguments
- lambda callbacks, Scopes: lambdas Can Be Nested Too
- quit function, Usage Notes: IDLE
- testing reloading variants, Testing reload variants
- TK_LIBRARY environment variable, Python Environment Variables
- traceback module, Displaying Errors and Tracebacks
- traceback objects, More on sys.exc_info, Displaying Errors and Tracebacks
- translation, Unicode: The Short Story (see encoding and decoding)
- triple quotes, Triple Quotes Code Multiline Block Strings–Triple Quotes Code Multiline Block Strings
- true value in Python, Booleans, The Meaning of True and False in Python–The bool type, Truth Values and Boolean Tests–Truth Values and Boolean Tests, Redefining built-in names: For better or worse, Boolean Tests: __bool__ and __len__–Boolean Methods in Python 2.X
-
- Booleans and, Booleans, The Meaning of True and False in Python–The bool type, Truth Values and Boolean Tests–Truth Values and Boolean Tests
- built-in scope and, Redefining built-in names: For better or worse
- operator overloading and, Boolean Tests: __bool__ and __len__–Boolean Methods in Python 2.X
- truncating division, Division: Classic, Floor, and True–Why does truncation matter?
- try statement, The try/except/else Statement–How try Statements Work, try Statement Clauses–The try else Clause, Example: Default Behavior, Example: Catching Built-in Exceptions, Debugging with Outer try Statements, What Should Be Wrapped
-
- about, The try/except/else Statement–How try Statements Work
- catching built-in exceptions, Example: Catching Built-in Exceptions
- clauses supported, try Statement Clauses–The try else Clause
- debugging with, Debugging with Outer try Statements
- default behavior, Example: Default Behavior
- wrapping statements with, What Should Be Wrapped
- try/except statement, Python’s Statements, Handling Errors with try Statements–Supporting floating-point numbers, Exception Basics, Catching Exceptions, Termination Actions, Catching any and all exceptions–Catching all: The empty except and Exception, Example: Catching Built-in Exceptions, Scopes and try except Variables, Nesting Exception Handlers–Example: Syntactic Nesting
-
- about, Python’s Statements, Exception Basics
- catching exceptions, Catching Exceptions, Termination Actions, Catching any and all exceptions–Catching all: The empty except and Exception, Example: Catching Built-in Exceptions
- error handling, Handling Errors with try Statements–Supporting floating-point numbers
- nesting, Nesting Exception Handlers–Example: Syntactic Nesting
- scopes and, Scopes and try except Variables
- try/except/else statement, The try/except/else Statement–Example: Catching Built-in Exceptions, Functions Can Signal Conditions with raise, Running In-Process Tests
- try/except/finally statement, Unified try/except/finally–Unified try Example, Example: Syntactic Nesting–Example: Syntactic Nesting
- try/finally statement, File Context Managers, Python’s Statements, Exception Basics, Exception Roles, Termination Actions–Termination Actions, The try/finally Statement–Example: Coding Termination Actions with try/finally, Closing Files and Server Connections, What Should Be Wrapped
-
- about, Python’s Statements, Exception Basics
- closing files and server connections, Closing Files and Server Connections
- closing files example, File Context Managers
- termination actions, Exception Roles, Termination Actions–Termination Actions, The try/finally Statement–Example: Coding Termination Actions with try/finally, What Should Be Wrapped
- -tt command-line flag, Avoid mixing tabs and spaces: New error checking in 3.X
- tuple built-in function, Conversions, methods, and immutability, Type Objects, Other Iteration Contexts
- tuple-unpacking assignments, Assignment Statement Forms, Tuple assignment in for loops–Tuple assignment in for loops
- tuples, The Grander Module Story: Attributes, Python’s Core Data Types, Tuples–Why Tuples?, Tuples, Why Tuples?, More Dictionary Methods, Using dictionaries for sparse data structures: Tuple keys, Tuples, Tuples, Tuples, Tuples, Tuples, Tuples, Tuples, Tuples, Tuples, Tuples, Tuples, Tuples, Tuples, Tuples in Action–Conversions, methods, and immutability, Conversions, methods, and immutability–Conversions, methods, and immutability, Conversions, methods, and immutability–Conversions, methods, and immutability, Conversions, methods, and immutability–Conversions, methods, and immutability, Conversions, methods, and immutability, Conversions, methods, and immutability, Why Lists and Tuples?, Records Revisited: Named Tuples–Records Revisited: Named Tuples, Comparisons, Equality, and Truth, Test Your Knowledge: Quiz, On the other hand: performance, conciseness, expressiveness, Why Exception Hierarchies?
-
- about, The Grander Module Story: Attributes, Tuples–Why Tuples?, Tuples
- assignments and, On the other hand: performance, conciseness, expressiveness
- common operations, Tuples, Tuples in Action–Conversions, methods, and immutability
- comparison operations, Comparisons, Equality, and Truth
- concatenating, Tuples
- converting, Conversions, methods, and immutability–Conversions, methods, and immutability
- count method, Tuples, Conversions, methods, and immutability
- empty, Tuples
- exception hierarchies and, Why Exception Hierarchies?
- immutable, Tuples, Conversions, methods, and immutability–Conversions, methods, and immutability
- index method, Tuples, Conversions, methods, and immutability
- indexing, Tuples
- iteration in, Tuples
- lists versus, Why Lists and Tuples?
- literals, Python’s Core Data Types, Tuples
- named, Why Tuples?, More Dictionary Methods, Tuples, Records Revisited: Named Tuples–Records Revisited: Named Tuples
- nesting, Tuples
- quiz questions and answers, Test Your Knowledge: Quiz
- repeating, Tuples
- slicing, Tuples
- tuple keys, Using dictionaries for sparse data structures: Tuple keys
- type-specific methods, Conversions, methods, and immutability–Conversions, methods, and immutability
- 2to3 converter, 2to3 converter
- type built-in function, How to Break Your Code’s Flexibility, Type Objects, New-Style Class Changes, Type Model Changes–Implications for type testing
- type designators, Variables, Objects, and References
- type object, Classes Are Instances of type–Classes Are Instances of type, Metaclasses Are Subclasses of Type, Inheritance and Instance
-
- classes as instances of, Classes Are Instances of type–Classes Are Instances of type
- inheritance and, Inheritance and Instance
- metaclasses as subclasses of, Metaclasses Are Subclasses of Type
- TypeError exception, Example: Catching Built-in Exceptions, To Metaclass or Not to Metaclass
- types module, Type Objects, A Recursive Reloader