[issue41147] Document that redirect_std{out, err} yield the new stream as the context variable

2020-06-28 Thread Peter Law
Change by Peter Law : -- keywords: +patch pull_requests: +20352 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21199 ___ Python tracker <https://bugs.python.org/issu

[issue41147] Document that redirect_std{out, err} yield the new stream as the context variable

2020-06-28 Thread Peter Law
New submission from Peter Law : In `contextlib`, `_RedirectStream` (the class behind `redirect_stdout` and `redirect_stderr`) returns the current stream target as its context variable, which allows code like this: ``` python with redirect_stdout(io.StringIO()) as buffer: do_stuff() use

[issue40540] inconstent stdin buffering/seeking behaviour

2020-05-06 Thread Peter Law
New submission from Peter Law : `sys.stdin` (on Windows, tested Pythons 3.6-3.8) appears to have different seeking behaviour depending on the source of the incoming data. This seems arguably reasonable given that `stdin` isn't always seekable, however even in the failing

[issue23600] tizinfo.fromutc changed for tzinfo wih StdOffset=0, DstOffset=1

2015-09-28 Thread Peter Law
Peter Law added the comment: Awesome, thanks for fixing this. -- nosy: +PeterJCLaw ___ Python tracker <http://bugs.python.org/issue23600> ___ ___ Python-bug