overriding methods - two questions

Donn Ingle donn.ingle at gmail.com
Sat Nov 17 11:19:07 CET 2007

> *not* being called by the user but *by* my API (in a timeout loop).
> You don't know that. How can you possibly guarantee that the user won't
> find some other use for the draw() method 
Well, as per your good examples, I would answer that as the parameters
passed to draw() grow in number, so the API is actually growing and so the
draw() call will be updated. Or, other calls can be introduced like
drawPreview() etc. (Better cos it won't break old code.)

The way it is now, in heavy alpha :), is that the draw() is *only* called
outwards and does not return or call parentClass.draw( self, ...) back in
any way. It's a pure source of context.cairo_<whatever> commands.

> BTW, it is a convention for method names to be lower case, and classes to
> be Title case. Seeing something like obj.Draw, most(?) Python developers
> will expect that the Draw attribute of obj is itself a class:
Thanks, I'm pretty damn unorganized in that way. Is it convention to do:

class BigLetterAndCamels():
 def smallLetterAndCamels()

 def smallletterandnocamels()



More information about the Python-list mailing list