Here are a few. I'm sure people who know more about Python could contribute more:

- Use keyword parameters with good default values when a method needs to have an additional parameter. This allows old code to continue to work while new code can pass in the extra information using the keyword.

- When an object is being passed into a method, and the method needs to be changed to make use of some new characteristic of the object, use reflection to determine whether the object has that characteristic. This allows either old or new objects to be passed into the method.

- When a method needs to be renamed, keep around the old name by just assigning it to the new method, i.e., oldfunc = newfunc.

Tom

Brock Pytlik wrote:
Python provides several ways to preserve compatibility of interfaces. We just need to use them.
Please elaborate, I'd certainly improve my own development.

Brock


begin:vcard
fn:Tom Mueller
n:Mueller;Tom
org:Sun Microsystems, Inc.;SWI Install/Update Software
adr:;;21915 Hillandale Dr;Elkhorn;NE;68022;USA
email;internet:[EMAIL PROTECTED]
title:Senior Staff Engineer
tel;work:877-250-4011
tel;fax:877-250-4011
tel;home:402-916-9943
x-mozilla-html:TRUE
version:2.1
end:vcard

_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to