[issue15243] Misleading documentation for __prepare__

2020-01-25 Thread Berker Peksag
Change by Berker Peksag : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7, Python 3.8, Python 3.9 -Python 3.5, Python 3.6 ___ Python tracker _

[issue15243] Misleading documentation for __prepare__

2020-01-25 Thread Berker Peksag
Berker Peksag added the comment: New changeset 548685e364af3d366d3aef924b2077ee6f8d13dc by Berker Peksag (Miss Islington (bot)) in branch '3.7': bpo-15243: Document __prepare__ as classmethod (GH-17124) https://github.com/python/cpython/commit/548685e364af3d366d3aef924b2077ee6f8d13dc --

[issue15243] Misleading documentation for __prepare__

2020-01-25 Thread Berker Peksag
Berker Peksag added the comment: New changeset 321491a536c378227f9d574703f7c06f89c67dcf by Berker Peksag (Miss Islington (bot)) in branch '3.8': bpo-15243: Document __prepare__ as classmethod (GH-17124) https://github.com/python/cpython/commit/321491a536c378227f9d574703f7c06f89c67dcf --

[issue15243] Misleading documentation for __prepare__

2020-01-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +17569 pull_request: https://github.com/python/cpython/pull/18186 ___ Python tracker ___ __

[issue15243] Misleading documentation for __prepare__

2020-01-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +17568 pull_request: https://github.com/python/cpython/pull/18185 ___ Python tracker ___ __

[issue15243] Misleading documentation for __prepare__

2020-01-25 Thread Berker Peksag
Berker Peksag added the comment: New changeset 7de617455ed788e6730c40cf854c4b72b0432194 by Berker Peksag (alclarks) in branch 'master': bpo-15243: Document __prepare__ as classmethod (GH-17124) https://github.com/python/cpython/commit/7de617455ed788e6730c40cf854c4b72b0432194 -- ___

[issue15243] Misleading documentation for __prepare__

2019-11-12 Thread Alex
Change by Alex : -- nosy: +alclarks ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/m

[issue15243] Misleading documentation for __prepare__

2019-11-12 Thread Alex
Change by Alex : -- pull_requests: +16632 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/17124 ___ Python tracker ___ _

[issue15243] Misleading documentation for __prepare__

2019-11-04 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue15243] Misleading documentation for __prepare__

2019-10-27 Thread Benjamin Edwards
Benjamin Edwards added the comment: Is this still open, does the patch still need a pull request? -- nosy: +benedwards14 ___ Python tracker ___ ___

[issue15243] Misleading documentation for __prepare__

2016-06-17 Thread Jaysinh shukla
Jaysinh shukla added the comment: Submitting patch according to this (http://bugs.python.org/issue15243#msg268356) message. Thanks! -- keywords: +patch nosy: +jaysinh.shukla Added file: http://bugs.python.org/file43432/issue15243_diff_python3.5_3.6_v1.diff

[issue15243] Misleading documentation for __prepare__

2016-06-12 Thread Berker Peksag
Berker Peksag added the comment: The documentation should mention that the __prepare__ method must be implemented as a classmethod (see msg164697 for the reference.) The example at https://docs.python.org/dev/reference/datamodel.html#metaclass-example needs to be linked from the "Preparing th

[issue15243] Misleading documentation for __prepare__

2016-06-05 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: I think the current documentation is correct and doesn't need changes. There is also already an example of a working __prepare__ method. -- nosy: +Jelle Zijlstra ___ Python tracker

[issue15243] Misleading documentation for __prepare__

2016-06-03 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue15243] Misleading documentation for __prepare__

2016-06-02 Thread Berker Peksag
Changes by Berker Peksag : -- keywords: +easy versions: +Python 3.6 -Python 3.4 ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue15243] Misleading documentation for __prepare__

2014-06-29 Thread Mark Lawrence
Mark Lawrence added the comment: Does the documentation need amending, yes or no? -- components: -Tests nosy: +BreamoreBoy versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3 ___ Python tracker _

[issue15243] Misleading documentation for __prepare__

2012-07-05 Thread Daniel Urban
Daniel Urban added the comment: Actually the docs contained a similar sentence ("If the metaclass has a :meth:`__prepare__` attribute (usually implemented as a class or static method), ..."), but it was removed in befd56673c80 when Nick rewrote this section. -- _

[issue15243] Misleading documentation for __prepare__

2012-07-05 Thread William Schwartz
William Schwartz added the comment: Daniel, Good point. However it would still be useful for documentation to point out that __prepare__ can be passed the metaclass as the implicit first argument by being decorated by classmethod. I'll post a small patch when I get a chance to add a sentence

[issue15243] Misleading documentation for __prepare__

2012-07-05 Thread Daniel Urban
Daniel Urban added the comment: __prepare__ is not implicitly a staticmethod, and it is called exactly as documented (also in types.prepare_class). There is no implicit first argument because the method is called on the (meta)class object. -- ___ P

[issue15243] Misleading documentation for __prepare__

2012-07-05 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo, ncoghlan stage: -> needs patch versions: +Python 3.2 ___ Python tracker ___ ___ Pytho

[issue15243] Misleading documentation for __prepare__

2012-07-03 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +daniel.urban ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue15243] Misleading documentation for __prepare__

2012-07-03 Thread William Schwartz
William Schwartz added the comment: Attached a unittest script to demonstrate that __prepare__ is implicitly a staticmethod. -- Added file: http://bugs.python.org/file26245/test_metaclass.py ___ Python tracker __

[issue15243] Misleading documentation for __prepare__

2012-07-03 Thread William Schwartz
New submission from William Schwartz : Section 3.3.3.2. "Preparing the class namespace" of the documentation (http://docs.python.org/dev/reference/datamodel.html#preparing-the-class-namespace) states that "If the metaclass has a __prepare__ attribute, it is called as ``namespace = metaclass.__