Skip to content

Commit 44ff6b5

Browse files
authored
Docs: add dunder and walrus to the glossary (#137430)
1 parent 39bd7c3 commit 44ff6b5

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Doc/glossary.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,11 @@ Glossary
435435
with :term:`abstract base classes <abstract base class>`.) Instead, it
436436
typically employs :func:`hasattr` tests or :term:`EAFP` programming.
437437

438+
dunder
439+
An informal short-hand for "double underscore", used when talking about a
440+
:term:`special method`. For example, ``__init__`` is often pronounced
441+
"dunder init".
442+
438443
EAFP
439444
Easier to ask for forgiveness than permission. This common Python coding
440445
style assumes the existence of valid keys or attributes and catches
@@ -1474,6 +1479,11 @@ Glossary
14741479
A computer defined entirely in software. Python's virtual machine
14751480
executes the :term:`bytecode` emitted by the bytecode compiler.
14761481

1482+
walrus operator
1483+
A light-hearted way to refer to the :ref:`assignment expression
1484+
<assignment-expressions>` operator ``:=`` because it looks a bit like a
1485+
walrus if you turn your head.
1486+
14771487
Zen of Python
14781488
Listing of Python design principles and philosophies that are helpful in
14791489
understanding and using the language. The listing can be found by typing

0 commit comments

Comments
 (0)