1) I read and reread carefully all the opinions. The lack
of consistency in wxPython seems to be the common denominator
of all posts (and also in previous threads). This is going
far deeper than the names and arguments of the dc.methods().
2) I think, we should see the problem from one another
perspective. The real question is: To whom is wxPython
adressed? Of course, to Python users, however I see two
groups of users.
(a) C++ experimented users. For those people, wxPython
is just a Python wrapper of wxWidgets. Eg, they are aware
the position of a wx.Window -a tuple- is the Python pendant
of a C structure called wx.Point. Realizing this, they
tend to accepts everything.
(b) Pure Python users and/or C++ illiterate users. For
the members of this group, wxPython is just a Python
module. It is an important module, because it is
their GUI toolkit. This module should behave like any other
Python module. In the ideal case, they do not want to know
from where wxPython is coming from. They even do not want
to know that wxPython is written in C/C++. It could have been
done in pascal or assembler.
Unfortnatelly (if I can say like this), wxPython developpers
belong to the (a) group. (I know, there are some pure
wxPython widgets). I am a member of the (b) group.
4) For clarity, a Python user has to know two thinks:
i) a position is a 2-tuple (x, y)
ii) a size is a 2-tuple (w, h).
Amen, that's all. She/he even does not have to know,
a position is wx.Point.
···
=============================================================
It is amazing to see, that just sticking on this convention,
the *whole* library becomes limpid.
It's clear with and without keyword arguments.
wx.Frame.__init__(self, parent, id, title=s, pos=(10, 10), size=(600, 500), style=sty)
or
wx.Frame.__init__(self, parent, id, title=s, (10, 10), (600, 500), style=sty)
It avoids duplicate functions.
dc.DrawPoint and dc.DrawPointXY
It can eliminate some opaque functions.
self.GetSize()
self.GetSizeTuple()
I do not care GetSize() returns a <class 'wx.core.Size'> object.
Knowing the returned size is a <type 'tuple'>, (a, b) is enough.
Event methods
...
and so on
5) Backward compatibility. That's an holly word!
If you do not make this changes in now (2.5), when
will be these done?
Jean-Michel Fauth, Switzerland