Commit Graph

613 Commits

Author SHA1 Message Date
Miss Islington (bot) d23ee5d652
Improve IO tutorial's "Old string formatting" section (GH-16251)
* Use a more universal explanation of string interpolation rather than specifically referencing sprintf(), which depends on the reader having a C background.

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
(cherry picked from commit eaca2aa117)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
2020-05-27 18:41:38 -07:00
Rahul Kumaresan eefd4e0333
bpo-39705 : sorted() tutorial example under looping techniques improved (GH-18999) 2020-05-17 18:32:34 -07:00
Noah Doersing 8bcfd31cc0
Change 'exception happened' to 'exception occurred' in two places (#19767) 2020-04-30 21:30:10 -07:00
Antoine e5e56328af
bpo-39869: Fix typo in 'Instance objects' section. (GH-18889) 2020-03-10 07:17:40 -07:00
Don Kirkby 3ed4d25158
Grammar fix in tutorial (GH-18425) 2020-02-09 19:57:46 -05:00
Julien Palard 446463f8db
bpo-39534: Doc: Clarify return in finally (GH-18324) 2020-02-06 23:16:48 +01:00
Adorilson Bezerra 5807efd4c3
bpo-38558: Link to further docs from walrus operator mention in tutorial (GH-16973) 2020-02-03 18:11:19 +01:00
Shanavas M 7142df5ea2 bpo-39431: Also mention nonlocal in assignment quirk (GH-17375) 2020-01-23 13:09:21 -05:00
Raymond Hettinger 04c79d6088
bpo-38678: Improve argparse example in tutorial (GH-17207) 2019-11-17 22:06:19 -08:00
Jules Lasne (jlasne) 5e01a6542a Update interpreter.rst (GH-17059)
Fixed what seemed to be a weird phrasing.
2019-11-05 14:20:38 +01:00
Ammar Askar cb2cf06b0a bpo-38558: Mention `:=` in conditions tutorial (GH-16919) 2019-10-25 17:20:05 -05:00
Mohammad Dehghan 1ad7be2f16 bpo-38130: Fix error in explaining when an exception is re-raised (GH-16016)
Co-Authored-By: Ashwin Ramaswami <aramaswamis@gmail.com>
2019-09-26 11:09:05 +02:00
Jason Plurad 9ab6038fe8 Doc: Corrected syntax for return annotation (GH-16265)
Signed-off-by: Jason Plurad <pluradj@us.ibm.com>
2019-09-19 07:24:29 +02:00
Diego Alberto Barriga Martínez b57481318e bpo-37904: Edition on python tutorial - section 4 (GH-16169)
A little change on first paragraph of python tutorial to be more clearly



https://bugs.python.org/issue37904



Automerge-Triggered-By: @ericvsmith
2019-09-17 09:57:55 -07:00
Adorilson Bezerra f18242be16 Doc: Add link of GNU Readline library to interpreter tutorial (GH-16152) 2019-09-16 18:18:04 +02:00
Adorilson Bezerra b7af4e7565 Doc: remove duplicate word in controlflow tutorial (GH-16163) 2019-09-16 09:04:58 +02:00
Kyle Stanley ff603f6c3d bpo-37635: Update arg name for seek() in IO tutorial (GH-16147)
Typically, the second positional argument for ``seek()`` is *whence*. That is the POSIX standard name (http://man7.org/linux/man-pages/man3/lseek.3p.html) and the name listed in the documentation for ``io`` module (https://docs.python.org/3/library/io.html#io.IOBase.seek). 

The tutorial for IO is the only location where the second positional argument for ``seek()`` is referred to as *from_what*. I suspect this was created at an early point in Python's history, and was never updated (as this section predates the GitHub repository):

```
$ git grep "from_what"
Doc/tutorial/inputoutput.rst:To change the file object's position, use ``f.seek(offset, from_what)``.  The position is computed
Doc/tutorial/inputoutput.rst:the *from_what* argument.  A *from_what* value of 0 measures from the beginning
Doc/tutorial/inputoutput.rst:the reference point.  *from_what* can be omitted and defaults to 0, using the
```

For consistency, I am suggesting that the tutorial be updated to use the same argument name as the IO documentation and POSIX standard for ``seek()``, particularly since this is the only location where *from_what* is being used.

Note: In the POSIX standard, *whence* is technically the third positional argument, but the first argument *fildes* (file descriptor) is implicit in Python.


https://bugs.python.org/issue37635
2019-09-14 13:29:23 -07:00
toonarmycaptain 0cc27417f2 Improve clarity of try-return-finally-return (GH-15677)
Clarify execution in try-return-finally-return case.
2019-09-11 17:37:13 +02:00
William Andrea faff81c05f Correct info about "f.read(size)". (GH13852)
In text mode, the "size" parameter indicates the number of characters, not bytes.
2019-09-10 15:50:26 +01:00
Raymond Hettinger 69ee87e99c
bpo-14112: Allow beginners to explore shallowness in greater depth ;-) (GH-15465) 2019-08-24 11:15:44 -07:00
Raymond Hettinger 6fcb6cfb13
bpo-30826: Improve control flow examples (GH-15407) 2019-08-22 23:44:19 -07:00
Raymond Hettinger 483ae0cf1d
bpo-12634: Clarify an awkward section of the tutorial (GH-15406) 2019-08-22 23:27:04 -07:00
Raymond Hettinger 4109263a7e
bpo-14050: Note that not all data can be sorted (GH-15381) 2019-08-22 09:11:35 -07:00
Abhilash Raj dcfe111eb5 bpo-37826: Document exception chaining in Python tutorial for errors. (GH-15243)
https://bugs.python.org/issue37826
2019-08-14 14:11:32 -07:00
mental 2491134029 bpo-37726: Prefer argparse over getopt in stdlib tutorial (#15052) 2019-08-01 07:17:30 -07:00
Julien Palard 2da622ff77
Doc: Fix: Proper UpperCamelCase and lowercase. (GH-14644)
Initial report by Michael Blankenship on docs@
2019-07-08 23:06:32 +02:00
Brett Cannon f9f8e3ce70
bpo-37403: Touch up venv docs (GH-14458)
Add a versionadded for PS Core and note that `.venv` is a common virtual environment name.
2019-06-28 12:14:31 -07:00
Steve Dower 7a177c08ab
Improve Windows commands in tutorial (GH-14379) 2019-06-26 08:55:57 -07:00
Xtreak 080b6b40fa bpo-37392: Update the dir(sys) in module tutorial (GH-14365) 2019-06-25 14:16:54 +02:00
Brad 8b2aa1fdde Use `python -m pip install` in porting guide and venv docs (GH-13257)
This is to help prevent people from accidentally installing into the wrong Python interpreter if they are not aware of which Python interpreter `pip` points to.
2019-06-21 11:20:21 -07:00
Łukasz Langa 9ab2fb1c68
Bump to 3.9.0a0 2019-06-04 22:12:32 +02:00
Marco Buttu 218e47b618 bpo-29414: Change 'the for statement is such an iterator' in Tutorial (GH-273) 2019-06-01 14:11:47 -07:00
pbhd e1f95e77e0 bpo-36739: Update controlflow.rst (GH-12983)
in addition to global-statement also mention nonlocal-statement
(in the paragraph describing access to variables which are non local to a function
2019-05-28 20:38:03 -07:00
Pablo Galindo b76302ddd0 bpo-36540: Documentation for PEP570 - Python positional only arguments (#13202)
* bpo-36540: Documentation for PEP570 - Python positional only arguments

* fixup! bpo-36540: Documentation for PEP570 - Python positional only arguments

* Update reference for compound statements

* Apply suggestions from Carol

Co-Authored-By: Carol Willing <carolcode@willingconsulting.com>

* Update Doc/tutorial/controlflow.rst

Co-Authored-By: Carol Willing <carolcode@willingconsulting.com>

* Add extra bullet point and minor edits
2019-05-28 16:45:32 -07:00
Julien Palard 51ddab8dae
Doc: Add missing forward reference in the tutorial. (GH-13499) 2019-05-28 15:10:23 +02:00
Utkarsh Gupta 3e2afd78ba bpo-36008: Doc update for 3.8 migration (GH-12887) 2019-05-13 08:29:39 -04:00
Adorilson Bezerra e19a91e45f Add a footnote about Cheese Shop in Doc/tutorial (GH-13103) 2019-05-07 16:20:58 -04:00
Jonatan 98a1e06c47 bpo-36189: Fixing typo in tutorial introduction (GH-13090) 2019-05-04 17:55:29 -04: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
Colin Watson 71ce03df9c Clarify file-closing example in tutorial (GH-11652) 2019-04-17 08:18:37 -04: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
Emmanuel Arias b00479d42a bpo-36377: Specify that range() can not be compared (GH-12468) 2019-04-01 21:52:42 -07:00
Raymond Hettinger fb28fcc925
Revert "Minor doc improvement (GH-10341)" (GH-12597)
This reverts commit dfd775a0b1.
2019-03-27 21:03:02 -07:00
Andre Delfino dfd775a0b1 Minor doc improvement (GH-10341)
Change "star-operator" to "* operator".
2019-03-26 21:17:50 -04:00
Ned Deily 6661c1720e
Replace "DOS box" with link to Windows FAQ. (GH-12390) 2019-03-24 15:03:54 -04:00
Cheryl Sabella b7105c9c96 bpo-35566: Add links to annotation glossary term (GH-11291) 2018-12-23 21:09:09 -08:00
Serhiy Storchaka 2b57c43f21
bpo-35506: Remove redundant and incorrect links from keywords. (GH-11174) 2018-12-19 08:09:46 +02:00
Andrés Delfino c5eec4426d Add a reference to the name mangling description in the tutorial to the index. (GH-10138) 2018-11-07 19:59:45 +02:00
İsmail Arılık fe62d877e3 Fix a typo about a comma. (GH-10306) 2018-11-03 17:05:59 +02:00
Serhiy Storchaka 3f819ca138
bpo-35110: Fix unintentional spaces around hyphens and dashes. (GH-10231) 2018-10-31 02:26:06 +02:00