This recipe that I submitted to the Python Cookbook
(http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/223611)
describes a technique for doing this.  I use the example of creating
Color objects for plotting to a bitmap, using either R,G,andB values,
or a single integer representing the RGB encoded value.

This style you describe is a Java language artifact.  If you have
optional params, then these really don't represent different method
signatures.  In my color example, you truly have different signatures,
either 3 integers representing color components, or a single encoded
integer.

-- Paul

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to