On Fri, Aug 12, 2011 at 6:02 PM, kj <no.em...@please.post> wrote:
> I ask myself, how does the journeyman Python programmer cope with
> such nonsense?
>

Firstly, figure out how many combinations of optional arguments
actually make sense. Any that don't, don't support. That may well cut
it down significantly. And then, if there are any that make sense but
will be really rare (eg if you allow optional specification of a max
and a min, and most times you'll use either both bounds or neither),
you can save a few by having the "optional" argument specified with a
sentinel meaning "default". It's ugly in a few places to justify
simplicity in most.

If you really need 100% flexibility, then the suggestions already
posted will definitely be the best.

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

Reply via email to