Ed Leafe wrote: > On Jun 19, 2008, at 8:17 PM, Paul McNett wrote: > >> Yes, because in your way, we perpetuate the existence of a meaningless >> evt arg. In my way we deprecate it for eventual removal. > > Added a deprecation warning doesn't make the code less ugly. It would > be trivial to add such a warning to the version with a default value > for the unnecessary parameter.
The issue is that *appdev code* has functions like: def onOk(self, evt): print "ok pressed" Now dDialog has: def _onOk(self, evt): self.onOk() and you are proposing: def _onOk(self, evt): self.onOk(evt=None) So you are in effect forcing appdev-level code to continue having the evt argument, even though it is useless. My code tries to make the call using self.onOk(), but if that fails issues a deprecation warning and calls it with evt=None. Next version, we get to remove all that. Now, if that is just way too ugly or complex, we should leave it as it is now and force people to clean it up immediately. We should *not* unconditionally send evt=None, because we don't want to *require* appdev code to accept that argument. Or am I completely off track and misunderstanding something? Paul _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev Searchable Archives: http://leafe.com/archives/search/dabo-dev This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]
