Ed Leafe wrote:
> On Jun 19, 2008, at 2:49 PM, Paul McNett wrote:
>
>>>> I'll just change the signature for them to: onOK(self, evt=None)
>> That'll work, but is ugly. Slightly better would be passing on the
>> original event, so at least there's a purpose for it.
>>
>> Perhaps this:
>>
>> try:
>> self.onOk()
>> except TypeError, e:
>> if "takes exactly 2 arguments" in str(e):
>> deprecation_warning("...")
>> self.onOk(evt=None)
>
>
> And you think that that is less ugly? ;-)
Yes, because in your way, we perpetuate the existence of a meaningless
evt arg. In my way we deprecate it for eventual removal.
> The only reason for adding the optional parameter is backwards
> compatibility. It simply isn't needed anymore. These are wx-level
> events, so passing it would cause more problems if anyone was
> expecting Dabo events.
True.
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]