[issue23674] super() documentation isn't very clear

2019-08-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 43b7ed77a8224c378b436ad3385733454198be41 by Raymond Hettinger (Miss Islington (bot)) in branch '3.8': bpo-23674: Clarify ambiguities in super() docs (GH-15564) (GH-15586)

[issue23674] super() documentation isn't very clear

2019-08-29 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue23674] super() documentation isn't very clear

2019-08-29 Thread miss-islington
Change by miss-islington : -- pull_requests: +15262 pull_request: https://github.com/python/cpython/pull/15586 ___ Python tracker ___

[issue23674] super() documentation isn't very clear

2019-08-29 Thread miss-islington
Change by miss-islington : -- pull_requests: +15261 pull_request: https://github.com/python/cpython/pull/15585 ___ Python tracker ___

[issue23674] super() documentation isn't very clear

2019-08-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset cd81f0500fe98c7f4cddb06530fffabd14f036b8 by Raymond Hettinger in branch 'master': bpo-23674: Clarify ambiguities in super() docs (#15564) https://github.com/python/cpython/commit/cd81f0500fe98c7f4cddb06530fffabd14f036b8 --

[issue23674] super() documentation isn't very clear

2019-08-28 Thread Raymond Hettinger
Change by Raymond Hettinger : -- pull_requests: +15239 pull_request: https://github.com/python/cpython/pull/15564 ___ Python tracker ___

[issue23674] super() documentation isn't very clear

2017-07-14 Thread Malcolm Smith
Malcolm Smith added the comment: I agree that the first two paragraphs are confusing. It's clearly not true to say "The search order is same as that used by getattr() except that the type itself is skipped", because as noted above, everything *earlier* than the type in the MRO is also

[issue23674] super() documentation isn't very clear

2017-05-20 Thread Cheryl Sabella
Cheryl Sabella added the comment: Thank you for pointing out those other links. For me, they all tie together because I was originally trying to figure out why the data model page defined `super(B, obj).m()` instead of just `super().m()`. It seems that the zero argument super is preferred,

[issue23674] super() documentation isn't very clear

2017-05-20 Thread Martin Panter
Martin Panter added the comment: Cheryl: see also Issue 25777 and Issue 20751, both about the “super binding” under Invoking Descriptors. Raymond: if you want to just pick parts of my patch, go for it. But I don’t understand your concern about explaining the MRO. I think it is important to

[issue23674] super() documentation isn't very clear

2017-05-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: Martin, can we just fix the signature here. It is not the purpose of the super docs explain the MRO (that is a feature of all new-style classes, super() is just something that hops to the next in the chain) or to be a tutorial. I would like to keep the

[issue23674] super() documentation isn't very clear

2017-05-19 Thread Cheryl Sabella
Cheryl Sabella added the comment: I don't know if it's appropriate to add this to this ticket, but on the Data Model doc page, section 3.3.2.2 for Invoking Descriptors describes Super Binding. A separate discussion with Nick in PR 1561 highlighted that section as a possible candidate for

[issue23674] super() documentation isn't very clear

2017-04-08 Thread Martin Panter
Martin Panter added the comment: The magical no-argument call could also be clarified: 8. Define in the main text what happens when you omit the first argument (the subclass) to “super”. At the moment, I think the reader could infer that it is the method’s class, but this is only hinted by

[issue23674] super() documentation isn't very clear

2015-12-05 Thread Martin Panter
Martin Panter added the comment: Here is a patch against Python 3 with my suggestions. Let me know what you think, if I got anything wrong, extra bits that could be changed, etc. -- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file41255/super.patch

[issue23674] super() documentation isn't very clear

2015-12-01 Thread Martin Panter
Martin Panter added the comment: Here are some specific changes I suggest: 1. Most confusing: super() uses the MRO of the second argument, not the first. 2. Clarify that is is not just the first argument that is skipped in the MRO, it is all preceding classes as well. The first argument does

[issue23674] super() documentation isn't very clear

2015-03-20 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23674 ___ ___ Python-bugs-list

[issue23674] super() documentation isn't very clear

2015-03-16 Thread Tapani Kiiskinen
Tapani Kiiskinen added the comment: A link to the to the glossary would also be good yes. I was figuring out how super() works and as you said the doc gave the impression getattr would explain more but it doesn't. Had to use google to find the glossary entry for MRO which had the link

[issue23674] super() documentation isn't very clear

2015-03-15 Thread Tapani Kiiskinen
New submission from Tapani Kiiskinen: https://docs.python.org/3/library/functions.html#super There's no mention in the document which __mro__ is used in the case of a super(Type, obj) call. There's this mention 'The __mro__ attribute of the *type* lists the method resolution search order used

[issue23674] super() documentation isn't very clear

2015-03-15 Thread R. David Murray
R. David Murray added the comment: I agree with Tapani; what you just explained should be made explicit (the type is skipped isn't the same as searching starts from the item after the type in the object's MRO). Also, the docs imply by the phrasing that the getattr docs will explain the

[issue23674] super() documentation isn't very clear

2015-03-15 Thread Raymond Hettinger
Raymond Hettinger added the comment: There's this mention 'The __mro__ attribute of the *type* lists the method resolution search order used by both getattr() and super(). I think instead of *type* it should say *object-or-type*. It is the second argument that supplied the MRO. The first

[issue23674] super() documentation isn't very clear

2015-03-15 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- assignee: docs@python - rhettinger nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23674 ___