Skip to content

Commit

Permalink
simplify wording
Browse files Browse the repository at this point in the history
  • Loading branch information
picnixz committed Jun 14, 2024
1 parent ed85ecc commit 2006568
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions Doc/reference/expressions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,8 @@ a subclass):
.. rubric:: Mangled names in imports

For identifiers declared using :keyword:`import` statements, the mangling
rule is slightly different. Throughout this paragraph, assume that we have
the following filesystem layout and, unless stated otherwise, the code snippets
are in the ``__main__.py`` file.
rule is slightly different. Throughout this paragraph, we consider the
following filesystem layout with code snippets in the ``__main__.py`` file.

.. code-block:: text
Expand Down Expand Up @@ -180,11 +179,6 @@ transformation rule is applied:

.. code-block:: python
class Bar:
# explicitly import '__bar' instead of '_Bar__bar'
__bar = __import__("__bar")
print(Bar._Bar__bar) # <module '__bar' from '/__bar.py'>
class Foo:
# explicitly import '__foo' instead of '_Foo__foo'
__foo = __import__("__foo")
Expand Down

0 comments on commit 2006568

Please sign in to comment.