File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -483,21 +483,19 @@ submodule. Let's say you have the following directory structure::
483483 spam/
484484 __init__.py
485485 foo.py
486- bar.py
487486
488- and ``spam/__init__.py `` has the following lines in it::
487+ and ``spam/__init__.py `` has the following line in it::
489488
490489 from .foo import Foo
491- from .bar import Bar
492490
493- then executing the following puts a name binding to ``foo `` and ``bar `` in the
491+ then executing the following puts name bindings for ``foo `` and ``Foo `` in the
494492``spam `` module::
495493
496494 >>> import spam
497495 >>> spam.foo
498496 <module 'spam.foo' from '/tmp/imports/spam/foo.py'>
499- >>> spam.bar
500- <module 'spam.bar' from '/tmp/imports/spam/bar.py '>
497+ >>> spam.Foo
498+ <class 'spam.foo.Foo '>
501499
502500Given Python's familiar name binding rules this might seem surprising, but
503501it's actually a fundamental feature of the import system. The invariant
You can’t perform that action at this time.
0 commit comments