Ned Batchelder
79f41dd9f3
Docs: remove __path__ discussion from tutorial ( #156426 )
...
* Docs: remove __path__ discussion from tutorial
This isn't the current best way to make namespace packages; almost no
one needs to make namespace packages; the deleted text even says "while
this feature is not often needed". It doesn't belong in the tutorial.
* add removed id to removed-ids.txt
2026-08-27 06:30:35 -04:00
Josh Cannon
4b68289ca6
Pedantic rewording of why relative importing doesn't work in main modules (GH-136846)
...
Pedantically reword the section about relative imports and main modules.
2025-07-21 09:30:17 -07:00
Jean-Louis GUENEGO
343182853f
feat(docs): type fix - apply pep8 by using docstring instead of comment in the doc. ( #135181 )
...
Giving the right example incitates the tutorial readers to do the same in the future.
2025-06-06 15:16:12 +02:00
3024b16d51
gh-101100: Consolidate documentation on ModuleType attributes ( #124709 )
...
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com >
Co-authored-by: Barry Warsaw <barry@python.org >
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
2024-10-09 10:53:57 +00:00
Unique-Usman and C.A.M. Gerlach
d71fcdee0f
gh-113208: Mention namespace packages don't require __init__.py ( #113209 )
...
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM >
2023-12-19 10:39:57 +02:00
Serhiy Storchaka
622ddc4167
Improve references in the tutorial (GH-108069)
...
* Use full qualified names for references (even if they do not work now,
they will work in future).
* Silence references to examples.
2023-08-21 13:41:01 +03:00
wulmer
680f3e1591
gh-71261: Add paragraph on shadowing submodules with star imports ( #107004 )
2023-07-23 03:00:42 -06:00
Adam Turner
d0122372f2
GH-97950: Use new-style index directive ('module') ( #103996 )
...
* Use new-style index directive ('module') - C API
* Use new-style index directive ('module') - Library
* Use new-style index directive ('module') - Reference
* Use new-style index directive ('module') - Tutorial
* Uncomment module removal in pairindextypes
* Use new-style index directive ('module') - C API
* Use new-style index directive ('module') - Library
* Use new-style index directive ('module') - Reference
2023-05-04 10:17:12 +02:00
Robert Prater (B. Eng)
0a539b5db3
gh-102703: Fix typo in modules tutorial documentation (GH-102707)
...
**Before**
This prevents directories with a common name, such as ``string``, unintentionally hiding ...
**After**
This prevents directories with a common name, such as ``string``, from unintentionally hiding ...
2023-03-14 17:03:43 -07:00
4b854b7466
gh-61585: Clarify import scope in modules tutorial (GH-93455)
...
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com >
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM >
2022-06-28 12:15:44 +02:00
slateny and Jelle Zijlstra
859250cc55
gh-77521: Add link to builtin module names in modules tutorial ( #92438 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
2022-05-08 12:30:38 -07:00
180909
efbc668183
gh-91541: Fix error in example in modules tutorial ( #91634 )
2022-04-17 14:17:04 -07:00
9ffe47df54
bpo-47189: What's New in 3.11: Faster CPython (GH-32235)
...
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com >
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
Co-authored-by: Guido van Rossum <gvanrossum@users.noreply.github.com >
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com >
2022-04-06 19:38:25 +08:00
Russel Webber
c62b944dfc
bpo-31582: Created a new documentation section describing sys.path initialization (GH-31082)
2022-03-23 17:29:40 +00:00
Peter Bittner
55b45bf707
bpo-38623: Add note about site module (site-packages) (GH-16974)
2021-09-23 23:39:58 +02:00
7cba23164c
bpo-39452: Rewrite and expand __main__.rst ( #26883 )
...
Broadened scope of the document to explicitly discuss and differentiate between ``__main__.py`` in packages versus the ``__name__ == '__main__'`` expression (and the idioms that surround it), as well as ``import __main__``.
Co-authored-by: Géry Ogam <gery.ogam@gmail.com >
Co-authored-by: Éric Araujo <merwok@netwok.org >
Co-authored-by: Łukasz Langa <lukasz@langa.pl >
2021-08-24 19:01:41 +02:00
Xtreak
080b6b40fa
bpo-37392: Update the dir(sys) in module tutorial (GH-14365)
2019-06-25 14:16:54 +02:00
Utkarsh Gupta
ee0309f3d8
closes bpo-35329: Change 'Package' to 'package' in accordance with PEP8. (GH-13008)
2019-04-29 19:20:06 -07:00
Inada Naoki
5410d3d283
better __init__.py explanation in tutorial ( #12763 )
...
* better __init__.py explanation in tutorial
* Update Doc/tutorial/modules.rst
Co-Authored-By: methane <songofacandy@gmail.com >
2019-04-11 15:10:35 +09:00
Serhiy Storchaka
2b57c43f21
bpo-35506: Remove redundant and incorrect links from keywords. (GH-11174)
2018-12-19 08:09:46 +02:00
Behzad B. Mokhtari
df748c20da
use rich markup for PEP reference (GH-7939)
...
it's better to refer to PEP with `pep` role in reStructuredText. It also links to the PEP page.
2018-06-26 20:57:39 -07:00
Andrés Delfino
b81ca28b37
bpo-33297: Mention Pillow to work with more image formats. ( #6505 )
...
Also update PIL doc references to Pillow.
2018-04-21 15:17:26 +03:00
Mario Corchero
fbee88244e
bpo-31454: Include information about "import X as Y" in Modules tutorial (GH-4041)
2018-02-25 11:11:12 -08:00
Raymond Hettinger
8c26a34f93
bpo-31757: Make Fibonacci examples consistent ( #3991 )
2017-10-14 07:36:08 -07:00
Martin Panter
898573a734
Issue #28820 : Fix spelling of “practice” as a noun
2016-12-10 05:12:56 +00:00
Martin Panter
1050d2d0c7
Issue #26462 : Doc: reduce literal_block warnings, fix syntax highlighting.
...
Patch by Julien Palard.
2016-07-26 11:18:21 +02:00
Serhiy Storchaka
dba903993a
Issue #23921 : Standardized documentation whitespace formatting.
...
Original patch by James Edwards.
2016-05-10 12:01:23 +03:00
Senthil Kumaran
80538e9dfe
Issue26135 - In the tutorial section on modules, reference importlib.reload instead of imp.reload.
2016-01-16 18:43:24 -08:00
Brett Cannon
f299abdafa
Issue #23731 : Implement PEP 488.
...
The concept of .pyo files no longer exists. Now .pyc files have an
optional `opt-` tag which specifies if any extra optimizations beyond
the peepholer were applied.
2015-04-13 14:21:02 -04:00
Brett Cannon
f811bbfe6c
Issue #6386 : When executing a script that's a symlink, the directory
...
where the symlink resolves to is added to sys.path, not the directory
containing the symlink itself.
Thanks to Sanko Resic for an initial attempt at the patch.
2014-02-06 09:22:51 -05:00
Georg Brandl
186729e812
merge with 3.3
2013-10-27 09:54:53 +01:00
Georg Brandl
325a1c2f37
Fix markup errors in the docs and amend suspicious ignores.
2013-10-27 09:16:01 +01:00
Georg Brandl
b9e8712a54
merge with 3.3
2013-10-12 19:13:38 +02:00
Georg Brandl
5db7c54f96
Closes #13915 : update tutorial with respect to .pyc files (__pycache__ / PEP 3147).
...
Initial wording proposed by John Roth.
2013-10-12 19:13:23 +02:00
Georg Brandl
59e3b23161
merge with 3.3
2013-10-06 19:21:20 +02:00
Georg Brandl
ac39addd72
Fix typo in example file name. Found by John Bokma on docs@.
2013-10-06 19:21:14 +02:00
Georg Brandl
9c45050300
merge with 3.3
2013-10-06 11:09:02 +02:00
Georg Brandl
22a1fd75cc
Fix wrong Python highlighting in directory hierarchy code block.
2013-10-06 11:08:24 +02:00
R David Murray
ca3f29413e
#15575 : Clarify tutorial description of when modules are executed.
2013-04-21 16:59:04 -04:00
R David Murray
25187e666b
#15575 : Clarify tutorial description of when modules are executed.
2013-04-21 16:58:36 -04:00
Georg Brandl
015427e659
merge with 3.3
2013-04-14 11:55:44 +02:00
Georg Brandl
5e2954e083
Clarify that the function *definition* creates the function and the binding in the module globals.
2013-04-14 11:47:46 +02:00
Ezio Melotti
ac6ca3dc02
Merge updates about dir() with 3.3.
2012-11-17 12:56:29 +02:00
Ezio Melotti
4a42ec5089
Merge updates about dir() with 3.2.
2012-11-17 12:54:45 +02:00
Ezio Melotti
52e855084d
Update section about dir() in the tutorial.
2012-11-17 12:50:14 +02:00
Sandro Tosi
da9df92068
add missing period; thanks to Gaston Fiore from docs@
2012-08-04 19:42:24 +02:00
Sandro Tosi
f0229aa51c
Issue #11948 : clarify modules search path
2012-01-19 11:29:26 +01:00
Senthil Kumaran
4707a998e4
Fix closes Issue12359 - Removing a confusing sentence from the previous change.
2011-06-20 07:30:34 -07:00
Senthil Kumaran
150857028c
minor space nit.
2011-06-19 17:41:33 -07:00
Senthil Kumaran
5c0347b398
Fix closes Issue12359 - Minor update to module import description.
2011-06-19 17:37:06 -07:00