
4. More Control Flow Tools — Python 3.13.3 documentation
2 days ago · Every Python developer should read it at some point; here are the most important points extracted for you: Use 4-space indentation, and no tabs. 4 spaces are a good compromise between small indentation (allows greater nesting depth) and large indentation (easier to read).
Transports and Protocols — Python 3.13.3 documentation
2 days ago · Flow Control Callbacks Flow control callbacks can be called by transports to pause or resume writing performed by the protocol. See the documentation of the set_write_buffer_limits() method for more details.
3. An Informal Introduction to Python
2 days ago · Using Python as a Calculator¶ Let’s try some simple Python commands. Start the interpreter and wait for the primary prompt, >>>. (It shouldn’t take long.) 3.1.1. Numbers¶ The interpreter acts as a simple calculator: you can type an expression at it and it will write the value.
4. Execution model — Python 3.13.3 documentation
4 days ago · A Python program is constructed from code blocks. A block is a piece of Python program text that is executed as a unit. The following are blocks: a module, a function body, and a class definition. Each command typed interactively is a block.
trace — Trace or track Python statement execution — Python …
2 days ago · trace — Trace or track Python statement execution¶ Source code: Lib/trace.py The trace module allows you to trace program execution, generate annotated statement coverage listings, print caller/callee relationships and list functions executed during a program run.
Streams — Python 3.15.0a0 documentation
2 days ago · This is a flow control method that interacts with the underlying IO write buffer. When the size of the buffer reaches the high watermark, drain() blocks until the size of the buffer is drained down to the low watermark and writing can be resumed.
Logging HOWTO — Python 3.13.3 documentation
Logging Flow¶ The flow of log event information in loggers and handlers is illustrated in the following diagram. Logger flow Create LogRecord Logging call in user code, e.g. logger.info(...)
8. Compound statements — Python 3.13.3 documentation
2 days ago · The if, while and for statements implement traditional control flow constructs. try specifies exception handlers and/or cleanup code for a group of statements, while the with statement allows the execution of initialization and finalization code around a block of code.
What’s New In Python 3.13
1 day ago · The transport flow control also now accounts for the datagram header when calculating the buffer size. (Contributed by Jamie Phan in gh-115199.) Add Queue.shutdown and QueueShutDown to manage queue termination. (Contributed by Laurie Opperman and Yves Duprat in gh-104228.)
Low-level API Index — Python 3.13.3 documentation
2 days ago · Return high and low water marks for write flow control. transport.set_write_buffer_limits() Set new high and low water marks for write flow control.