[issue39037] Wrong trial order of __exit__ and __enter__ in the with statement

2019-12-14 Thread Géry
Géry added the comment: Done @brett.cannon, would you like to review it? https://github.com/python/cpython/pull/17608 -- ___ Python tracker ___

[issue39037] Wrong trial order of __exit__ and __enter__ in the with statement

2019-12-14 Thread Géry
Change by Géry : -- keywords: +patch pull_requests: +17078 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/17608 ___ Python tracker ___

[issue39037] Wrong trial order of __exit__ and __enter__ in the with statement

2019-12-13 Thread Brett Cannon
Brett Cannon added the comment: @Gery please do open a documentation PR! :) -- nosy: +brett.cannon ___ Python tracker ___ ___

[issue39037] Wrong trial order of __exit__ and __enter__ in the with statement

2019-12-13 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- assignee: -> docs@python components: +Documentation -Interpreter Core keywords: +easy nosy: +docs@python stage: -> needs patch ___ Python tracker

[issue39037] Wrong trial order of __exit__ and __enter__ in the with statement

2019-12-13 Thread Géry
Géry added the comment: Thanks @mark.dickinson for the link. Can I open a documentation PR for this? -- ___ Python tracker ___ ___

[issue39037] Wrong trial order of __exit__ and __enter__ in the with statement

2019-12-13 Thread Mark Dickinson
Mark Dickinson added the comment: See issue 27100, which led to a deliberate change in behaviour to look up __enter__ before __exit__. It looks like the documentation (not the PEP text, which shouldn't be considered normative; just the reference manual) needs to be adjusted to match the new

[issue39037] Wrong trial order of __exit__ and __enter__ in the with statement

2019-12-13 Thread Géry
New submission from Géry : >>> class A: pass ... >>> with A(): pass ... Traceback (most recent call last): File "", line 1, in AttributeError: __enter__ I expected `AttributeError: __exit__`, since PEP 343 states