RE: [wxPython] wxTextCtrl method PostionToXY
I think it should raise an exception.
IMHO, as a general rule, exceptions should indicate a deviation from the expected behaviour. Unless ‘failure’ is a likely outcome, it should be an exception.
Dale Strickland-Clark
Riverhall Systems Ltd. Custom database and Web applications.
Offices: London & Wokingham
···
-----Original Message-----
From: Robin Dunn [mailto:robin@alldunn.com]
Sent: Thu, 2002 January 10 19:17
To: wxpython-users@lists.wxwindows.org
Subject: Re: [wxPython] wxTextCtrl method PostionToXY
I have a bunch of code which uses the old (and documented) interface, so
changing it back would be better for me, especially since not all my
users will necessarily upgrade to the latest version of wxPython
Okay, that makes sense. I’ll change it to someting compatible with the old
way.
What did the old version return on failure? Returning None to indicate
failure would seem to make sense.
I think it probably took the easy way out and just ignored it. Any votes on
returning None vs. raising an exception?
–
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!
wxpython-users mailing list