Re: pydoc vs. non-def'd methods

2013-08-22 Thread Dan Sommers
On Thu, 22 Aug 2013 06:39:48 +, Steven D'Aprano wrote: > On Thu, 22 Aug 2013 05:13:03 +, Dan Sommers wrote: >> class Spam1: >> >> def eggs(self): >> '''Return the Meaning of Life.''' >> return 42 >> >> ham = eggs >> >> >> help(Spam1) shows that ham = eggs(self)

Re: pydoc vs. non-def'd methods

2013-08-22 Thread Fábio Santos
On 22 Aug 2013 06:17, "Dan Sommers" wrote: > > Greetings, > > I'm hava a class in which there are two equally useful names for one > method. Consider this design (there are other approaches, but that's > not what my question is about): > > class Spam1: > > def eggs(self): > '''Return

Re: pydoc vs. non-def'd methods

2013-08-21 Thread Steven D'Aprano
On Thu, 22 Aug 2013 05:13:03 +, Dan Sommers wrote: > Greetings, > > I'm hava a class in which there are two equally useful names for one > method. Consider this design (there are other approaches, but that's > not what my question is about): Generally though, one name will be the canonical

pydoc vs. non-def'd methods

2013-08-21 Thread Dan Sommers
Greetings, I'm hava a class in which there are two equally useful names for one method. Consider this design (there are other approaches, but that's not what my question is about): class Spam1: def eggs(self): '''Return the Meaning of Life.''' return 42 ham = eggs help