Skip to content

Commit 29ebe04

Browse files
[3.13] Docs: add dunder and walrus to the glossary (GH-137430) (#137435)
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
1 parent 1bb2ae5 commit 29ebe04

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
@@ -402,6 +402,11 @@ Glossary
402402
with :term:`abstract base classes <abstract base class>`.) Instead, it
403403
typically employs :func:`hasattr` tests or :term:`EAFP` programming.
404404

405+
dunder
406+
An informal short-hand for "double underscore", used when talking about a
407+
:term:`special method`. For example, ``__init__`` is often pronounced
408+
"dunder init".
409+
405410
EAFP
406411
Easier to ask for forgiveness than permission. This common Python coding
407412
style assumes the existence of valid keys or attributes and catches
@@ -1399,6 +1404,11 @@ Glossary
13991404
A computer defined entirely in software. Python's virtual machine
14001405
executes the :term:`bytecode` emitted by the bytecode compiler.
14011406

1407+
walrus operator
1408+
A light-hearted way to refer to the :ref:`assignment expression
1409+
<assignment-expressions>` operator ``:=`` because it looks a bit like a
1410+
walrus if you turn your head.
1411+
14021412
Zen of Python
14031413
Listing of Python design principles and philosophies that are helpful in
14041414
understanding and using the language. The listing can be found by typing

0 commit comments

Comments
 (0)