mirror of
https://github.com/python/cpython.git
synced 2025-12-10 19:10:59 +00:00
Docs: add dunder and walrus to the glossary (#137430)
This commit is contained in:
parent
39bd7c3156
commit
44ff6b5451
1 changed files with 10 additions and 0 deletions
|
|
@ -435,6 +435,11 @@ Glossary
|
|||
with :term:`abstract base classes <abstract base class>`.) Instead, it
|
||||
typically employs :func:`hasattr` tests or :term:`EAFP` programming.
|
||||
|
||||
dunder
|
||||
An informal short-hand for "double underscore", used when talking about a
|
||||
:term:`special method`. For example, ``__init__`` is often pronounced
|
||||
"dunder init".
|
||||
|
||||
EAFP
|
||||
Easier to ask for forgiveness than permission. This common Python coding
|
||||
style assumes the existence of valid keys or attributes and catches
|
||||
|
|
@ -1474,6 +1479,11 @@ Glossary
|
|||
A computer defined entirely in software. Python's virtual machine
|
||||
executes the :term:`bytecode` emitted by the bytecode compiler.
|
||||
|
||||
walrus operator
|
||||
A light-hearted way to refer to the :ref:`assignment expression
|
||||
<assignment-expressions>` operator ``:=`` because it looks a bit like a
|
||||
walrus if you turn your head.
|
||||
|
||||
Zen of Python
|
||||
Listing of Python design principles and philosophies that are helpful in
|
||||
understanding and using the language. The listing can be found by typing
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue