[issue29134] contextlib doc bug

2017-01-04 Thread Kyle Altendorf
Kyle Altendorf added the comment: I would think that the idea of simply adding some reference to `User` such as was suggested with `UserDefinedContextClass` would be reasonable and helpful. This doesn't involve any more code merely a more explanatory name. -- nosy: +altendky

[issue29134] contextlib doc bug

2017-01-03 Thread Senthil Kumaran
Senthil Kumaran added the comment: I am going to vote for "not a bug" here. From the context is it understood that the `ContextBaseClass` is to be provided by the user. > Existing context managers that already have a base class can be extended by > using ContextDecorator as a mixin class: The

[issue29134] contextlib doc bug

2017-01-03 Thread SilentGhost
Changes by SilentGhost : -- assignee: -> docs@python components: +Documentation nosy: +docs@python stage: -> patch review type: -> behavior versions: +Python 3.5, Python 3.6, Python 3.7 ___ Python tracker __

[issue29134] contextlib doc bug

2017-01-02 Thread YoSTEALTH
YoSTEALTH added the comment: typo: def ContextBase: to class ContextBase: -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue29134] contextlib doc bug

2017-01-02 Thread YoSTEALTH
YoSTEALTH added the comment: @SilentGhost You are right, I see it now! If this is the case maybe "ContextBaseClass" should be changed to "UserDefinedContextClass" (or something...) having "Base" in the class name was confusing, since module "io" has IOBase class that refer to its "base class"

[issue29134] contextlib doc bug

2017-01-02 Thread Marco Buttu
Marco Buttu added the comment: Going a bit OT, in the contextlib doc there are two examples that have both normal code and shell code in the same code block. In this way we loose the prompt syntax highlight, and the code block can also confuse the reader. In the patch attached the two example

[issue29134] contextlib doc bug

2017-01-02 Thread SilentGhost
SilentGhost added the comment: ContextBaseClass is meant to represent a user-defined class that is a parent of mycontext. -- nosy: +SilentGhost ___ Python tracker ___ __

[issue29134] contextlib doc bug

2017-01-02 Thread Chris Warrick
Changes by Chris Warrick : -- nosy: +Kwpolska ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue29134] contextlib doc bug

2017-01-02 Thread YoSTEALTH
New submission from YoSTEALTH: Link: https://docs.python.org/3/library/contextlib.html#contextlib.ContextDecorator "from contextlib import ContextDecorator class mycontext(ContextBaseClass, ContextDecorator):" "ContextBaseClass" is referenced but its no where to be found in source. -