[Tutor] Classes that do operator overloading
C.T. Matsumoto
tmatsumoto at gmx.net
Sat Nov 7 10:39:37 CET 2009
yes,
class Foo: # the book says this is a class header
pass
As for my question it looks like the convention is if a class only has
operator overloading then the class receives a lowercase class name.
If the class has a mix, operator overloading and a normal method then
the class name gets starts with a capital.
It's just a detail, but I wanted to know.
T
Alan Gauld wrote:
>
> "C.T. Matsumoto" <tmatsumoto at gmx.net> wrote
>> I'm reading Learning Python's section 'Operator Overloading' and I
>> was wondering why class headers that implement and overload are
>> lowercase?
>
> I'm not sure what you mean by class headers?
> Can you post an example?
>
>
More information about the Tutor
mailing list