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)
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
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
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