[issue5229] Documentation for super() neglects to say what super() actually does

2009-02-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: I see what you mean but think that the docs shouldn't go into how super() is implemented. Already, they've reached an information density such that adding more explanations will make it collectively less clear. As soon as you mention proxy objects as inputs

[issue5229] Documentation for super() neglects to say what super() actually does

2009-02-25 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: In the previous example, I meant to type class B(A) and class C(B) rather than having them all derive from object. That's what I get for not actually testing the code. ;-) ___ Python tracker

[issue5229] Documentation for super() neglects to say what super() actually does

2009-02-25 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Actually, it's essential to how super() works. Here's an example using single inheritance: class A(object): def foo(self): print 'A' class B(object): def foo(self): super(B, self).foo() print 'B' class C(object): def foo(self): super(

[issue5229] Documentation for super() neglects to say what super() actually does

2009-02-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Perhaps add the following sentence to the end of > the first paragraph: "If *object-or-type* is a proxy > object, *super* returns a new proxy that additionally > skips *type*." I'm not really sure what that even means. Nor do I think it was one of the u

[issue5229] Documentation for super() neglects to say what super() actually does

2009-02-25 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Thanks! These improvements are very helpful. The one missing notion is that "object-or-type" may be a proxy object, in which case super() returns a new proxy that additionally skips "type". Perhaps add the following sentence to the end of the first paragrap

[issue5229] Documentation for super() neglects to say what super() actually does

2009-02-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: See: http://docs.python.org/dev/library/functions.html#super ___ Python tracker ___ ___ Python-bugs-list

[issue5229] Documentation for super() neglects to say what super() actually does

2009-02-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, I did a further update to the super docs to clarify that parent classes are search in single inheritance models and that both parent and siblings are searched in multiple inheritance models. Made the concept more concrete by relating pointing to the __

[issue5229] Documentation for super() neglects to say what super() actually does

2009-02-12 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Yes, by citing that article I don't mean to endorse its opinions. Regrettably, it's the best documentation on super() I could find (in an admittedly quick search). Any improvements efforts you make to improve the existing super() documentation would much app

[issue5229] Documentation for super() neglects to say what super() actually does

2009-02-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: I will work on this a bit more. Keep in mind that it will be hard to please the author of that article, as he finds the whole notion of multiple inheritance to be bankrupt. -- assignee: georg.brandl -> rhettinger nosy: +rhettinger priority: -> low

[issue5229] Documentation for super() neglects to say what super() actually does

2009-02-12 Thread David W. Lambert
Changes by David W. Lambert : -- nosy: +LambertDW ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue5229] Documentation for super() neglects to say what super() actually does

2009-02-12 Thread Daniel Stutzbach
New submission from Daniel Stutzbach : The documentation for super() describes the arguments that can be passed to super(), use cases for super(), an example, and caveats about what cannot be done with the returned object. However, the documentation neglects to mention what super() actually *doe