"spir" wrote
English is terrible. From wiktionary (abstracts)/
Indeed. and the fact that computer Scientists often abuse English
makes it worse!
header
Text, or other visual information, used to mark off a quantity of text,
often titling or summarizing it.
This is probaly the closest to
Le Sat, 7 Nov 2009 14:06:15 -,
"Alan Gauld" s'exprima ainsi:
> "C.T. Matsumoto" wrote
>
> > class Foo: # the book says this is a class header
> >pass
>
> Hmm, that's pretty dubious usage of header in my view.
> Its the class definition and there is nothing "header" about it.
Engli
"C.T. Matsumoto" wrote
class Foo: # the book says this is a class header
pass
Hmm, that's pretty dubious usage of header in my view.
Its the class definition and there is nothing "header" about it.
As for my question it looks like the convention is if a class only has
operator overload
Hugo Arts wrote:
On Sat, Nov 7, 2009 at 12:25 PM, C.T. Matsumoto wrote:
class indexer():
def ___getitem__(self, index):
return index ** 2
I thought I was missing some special style, or rule. The class above is take
from Learning Python, and there are several other examples too.
fo
On Sat, Nov 7, 2009 at 12:25 PM, C.T. Matsumoto wrote:
> Thanks Hugo,
>
> Do methods like __add__, __del__, count as built-in types? I'm aware of the
> rule you explained and use it and that's why when I saw:
>
Built-in types are only those classes 'built in' to the python
interpreter. They incl
Thanks Hugo,
Do methods like __add__, __del__, count as built-in types? I'm aware of the
rule you explained and use it and that's why when I saw:
class indexer():
def ___getitem__(self, index):
return index ** 2
I thought I was missing some special style, or rule. The class above i
On Sat, Nov 7, 2009 at 10:39 AM, C.T. Matsumoto wrote:
> 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, o
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 sta
"C.T. Matsumoto" 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?
--
Alan Gauld
Author of the Learn to Program web site