[issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior

2022-03-28 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Thanks for the patch! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior

2022-03-28 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 604d003ab4d1084ef828ebca1b28f2bf1b93c744 by Jelle Zijlstra in branch '3.10': [3.10] bpo-28516: document contextlib.ExitStack.__enter__ behavior (GH-31636) (GH-32171)

[issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior

2022-03-28 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- pull_requests: +30249 pull_request: https://github.com/python/cpython/pull/32171 ___ Python tracker ___

[issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior

2022-03-28 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 1e3132b1c3ebff8d28a6dd353bf217cb97c41e81 by Miss Islington (bot) in branch '3.9': bpo-28516: document contextlib.ExitStack.__enter__ behavior (GH-31636) (GH-32145)

[issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior

2022-03-27 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: New changeset 86384cf83f96fcaec03e2ad6516e2e24f20d3b92 by vidhya in branch 'main': bpo-28516: document contextlib.ExitStack.__enter__ behavior (GH-31636) https://github.com/python/cpython/commit/86384cf83f96fcaec03e2ad6516e2e24f20d3b92 --

[issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior

2022-03-27 Thread miss-islington
Change by miss-islington : -- pull_requests: +30225 pull_request: https://github.com/python/cpython/pull/32145 ___ Python tracker ___

[issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior

2022-03-27 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 7.0 -> 8.0 pull_requests: +30224 pull_request: https://github.com/python/cpython/pull/32144 ___ Python tracker

[issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior

2022-03-01 Thread Vidhya
Vidhya added the comment: @Jelle: Thanks. The PR is submitted at https://github.com/python/cpython/pull/31636 -- keywords: +patch message_count: 9.0 -> 10.0 pull_requests: +29758 pull_request: https://github.com/python/cpython/pull/31636 ___ Python

[issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior

2022-02-28 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: That sounds good. Feel free to request review from me if you make a PR. -- nosy: +Jelle Zijlstra ___ Python tracker ___

[issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior

2022-02-28 Thread Vidhya
Vidhya added the comment: [Entry level contributor seeking guidance] If this is still open, I can update the document. After reading all the above comments, planning to add "The __enter__ method returns the ExitStack instance, and performs no additional operations." at

[issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior

2021-12-06 Thread Andrei Kulakov
Andrei Kulakov added the comment: It's a bit more readable to start by stating what a function does rather than what it doesn't do. I also wouldn't worry about possible future minor optimizations that might be added, because if that happens, a simple ".. aside from internal optimizations,

[issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior

2021-06-18 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +easy -patch versions: +Python 3.11 -Python 3.5, Python 3.6, Python 3.7 ___ Python tracker ___

[issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior

2016-10-25 Thread Walker Hale IV
Walker Hale IV added the comment: Clarifying the documentation regarding the __enter__ method eliminates the need for further discussion on this point regarding pop_all(), which was really just the motivating use case. That leaves the question of the most readable documentation change that

[issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior

2016-10-25 Thread R. David Murray
R. David Murray added the comment: Actually, the __enter__ method is looked up on the class, so saying "the __enter__ method of the instance" could be a bit confusing. Also, many context managers return self, so 'trivially' isn't really necessary as a modifier. What if we added a sentence to

[issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior

2016-10-25 Thread Martin Panter
Martin Panter added the comment: I agree it is good to explicitly document the __enter__() result, rather than relying on assumptions and example code. The patch looks good to me. I don’t understand the problem with pop_all() though. Is there still a problem if we apply your patch?

[issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior

2016-10-24 Thread Walker Hale IV
Walker Hale IV added the comment: This one-line patch should clarify the point. -- ___ Python tracker ___ ___

[issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior

2016-10-24 Thread Walker Hale IV
Changes by Walker Hale IV : -- assignee: -> docs@python components: +Documentation keywords: +patch nosy: +docs@python Added file: http://bugs.python.org/file45206/issue28516.diff ___ Python tracker

[issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior

2016-10-24 Thread R. David Murray
R. David Murray added the comment: Hmm. I guess we just assume it is obvious, given that the with statement examples name the variable 'stack', and the pop_all docs mention that no callbacks are called until it is closed "or at the end of a with statement". So, technically, using the result

[issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior

2016-10-23 Thread Walker Hale IV
New submission from Walker Hale IV: contextlib.ExitStack implies but does not explicitly state that its __enter__ method trivially returns self. This means that if a user invokes pop_all and then uses the resulting ExitStack instance in a with statement, the user will be relying on