<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Doc/tutorial/inputoutput.rst, branch fix-namedexpr-comment</title>
<subtitle>github.com: python/cpython.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/'/>
<entry>
<title>bpo-37635: Update arg name for seek() in IO tutorial (GH-16147)</title>
<updated>2019-09-14T20:29:23+00:00</updated>
<author>
<name>Kyle Stanley</name>
<email>aeros167@gmail.com</email>
</author>
<published>2019-09-14T20:29:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=ff603f6c3d3dc0e9ea8c1c51ce907c4821f42c54'/>
<id>ff603f6c3d3dc0e9ea8c1c51ce907c4821f42c54</id>
<content type='text'>
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</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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</pre>
</div>
</content>
</entry>
<entry>
<title>Correct info about "f.read(size)". (GH13852)</title>
<updated>2019-09-10T14:50:26+00:00</updated>
<author>
<name>William Andrea</name>
<email>william.j.andrea@gmail.com</email>
</author>
<published>2019-09-10T14:50:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=faff81c05f838b0b7a64bbc8c53c02a9b04bb79d'/>
<id>faff81c05f838b0b7a64bbc8c53c02a9b04bb79d</id>
<content type='text'>
In text mode, the "size" parameter indicates the number of characters, not bytes.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In text mode, the "size" parameter indicates the number of characters, not bytes.</pre>
</div>
</content>
</entry>
<entry>
<title>Clarify file-closing example in tutorial (GH-11652)</title>
<updated>2019-04-17T12:18:37+00:00</updated>
<author>
<name>Colin Watson</name>
<email>cjwatson@ubuntu.com</email>
</author>
<published>2019-04-17T12:18:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=71ce03df9c643faa94fbdf73bbb4e99a9a62cbdc'/>
<id>71ce03df9c643faa94fbdf73bbb4e99a9a62cbdc</id>
<content type='text'>


</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>


</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-35506: Remove redundant and incorrect links from keywords. (GH-11174)</title>
<updated>2018-12-19T06:09:46+00:00</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2018-12-19T06:09:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=2b57c43f21f891df4c6f2294a3b9e1b9029a16b6'/>
<id>2b57c43f21f891df4c6f2294a3b9e1b9029a16b6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-34712: Fix style in examples in "Input and Output" (GH-9361)</title>
<updated>2018-09-19T10:28:28+00:00</updated>
<author>
<name>Ben Hoyt</name>
<email>benhoyt@gmail.com</email>
</author>
<published>2018-09-19T10:28:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=3705b9862025705ea60041a9e310f99a164db722'/>
<id>3705b9862025705ea60041a9e310f99a164db722</id>
<content type='text'>
A couple of fixes here to make this more PEP-8:

* Avoid multiple statements on one line with `;` statement separator -- this is very rare in Python and is "generally discouraged" in PEP 8 (and if used, per PEP 8 there shouldn't be a space before the `;`)
* Add output for the first "Formatted String Literals" example. (Side note: are the doctests for this being run? If so, why didn't it fail?)
* Avoid space before `!r`. I have generally not seen spaces before the `!`, and this also matches the style used in the docs here: https://docs.python.org/3/library/string.html#format-string-syntax



https://bugs.python.org/issue34712</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A couple of fixes here to make this more PEP-8:

* Avoid multiple statements on one line with `;` statement separator -- this is very rare in Python and is "generally discouraged" in PEP 8 (and if used, per PEP 8 there shouldn't be a space before the `;`)
* Add output for the first "Formatted String Literals" example. (Side note: are the doctests for this being run? If so, why didn't it fail?)
* Avoid space before `!r`. I have generally not seen spaces before the `!`, and this also matches the style used in the docs here: https://docs.python.org/3/library/string.html#format-string-syntax



https://bugs.python.org/issue34712</pre>
</div>
</content>
</entry>
<entry>
<title>Doc: Missing 'f' in an f-string. (GH-9074)</title>
<updated>2018-09-07T09:31:47+00:00</updated>
<author>
<name>Julien Palard</name>
<email>julien@palard.fr</email>
</author>
<published>2018-09-07T09:31:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=25fa141487e61b94f15289619cb3af764cf65e58'/>
<id>25fa141487e61b94f15289619cb3af764cf65e58</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove extra parentheses in output formatting tutorial (GH-8350)</title>
<updated>2018-07-20T16:06:44+00:00</updated>
<author>
<name>Aaqa Ishtyaq</name>
<email>aaqaishtyaq@gmail.com</email>
</author>
<published>2018-07-20T16:06:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=cb5f3fdb9d353a572dd22fb50a110e52d5bb81b1'/>
<id>cb5f3fdb9d353a572dd22fb50a110e52d5bb81b1</id>
<content type='text'>
The parentheses were incorrect.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The parentheses were incorrect.</pre>
</div>
</content>
</entry>
<entry>
<title>Fix documentation for input and output tutorial (GH-8231)</title>
<updated>2018-07-11T00:11:34+00:00</updated>
<author>
<name>Lysandros Nikolaou</name>
<email>lisandrosnik@gmail.com</email>
</author>
<published>2018-07-11T00:11:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=9cffdbffc3b2dec18def1c3e8cfa166d01d609df'/>
<id>9cffdbffc3b2dec18def1c3e8cfa166d01d609df</id>
<content type='text'>
The ValueError message ends with a period.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The ValueError message ends with a period.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-28626: rearrange discussion of output formatting to encourage f-strings (#6036)</title>
<updated>2018-07-07T21:36:23+00:00</updated>
<author>
<name>Andrew Kuchling</name>
<email>amk@amk.ca</email>
</author>
<published>2018-07-07T21:36:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=ced350b1952857a9b9c68ec7e2786358bcb61050'/>
<id>ced350b1952857a9b9c68ec7e2786358bcb61050</id>
<content type='text'>
The 'output formatting' section of the tutorial talks a lot about manual formatting with things like .rjust() and .zfill(), with only a passing reference to 3.6's new f-strings.

This doesn't drop all of the old material, but it does rearrange the topics into a more modern order: f-strings first, discussing formatting specifiers a bit; then calling .format(); finally manual formatting with .ljust().
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The 'output formatting' section of the tutorial talks a lot about manual formatting with things like .rjust() and .zfill(), with only a passing reference to 3.6's new f-strings.

This doesn't drop all of the old material, but it does rearrange the topics into a more modern order: f-strings first, discussing formatting specifiers a bit; then calling .format(); finally manual formatting with .ljust().
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-25059: Clarify the print separator usage in tutorial (GH-5879)</title>
<updated>2018-02-25T19:06:01+00:00</updated>
<author>
<name>Cheryl Sabella</name>
<email>cheryl.sabella@gmail.com</email>
</author>
<published>2018-02-25T19:06:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=84c4b0cc67ceb4b70842b78c718b6e8214874d6a'/>
<id>84c4b0cc67ceb4b70842b78c718b6e8214874d6a</id>
<content type='text'>
By default `print` adds spaces between its arguments.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
By default `print` adds spaces between its arguments.</pre>
</div>
</content>
</entry>
</feed>
