On 10 Mar 2006 09:51:01 GMT
Duncan Booth <[EMAIL PROTECTED]> wrote:
> Dmitry Anikin wrote:
> > Is there some contradiction in python syntax which
> > disallows an easy implementation of this feature, or
> > just nobody bothered with this? If former is the case,
> > please show me why, because I badly need this feature in
> > embedded python app (for compatibility with other
> > language that uses such syntax) and might venture to
> > implement it myself, so don't want to waste time if it's
> > gonna break something.
> >
> I think you would find it hard to implement exactly that
> in Python. Of course what you can do easily enough is
> invent a magic 'missing' value and map Python calls of:
>
> a_func(missing, missing, 3)
>
> to a call of:
>
> a_func(,,3)
It's not uncommon, of course, to use "None" for this
purpose. I have a lot of code that does something like:
def myfunc(a, b, c):
if a is None:
a = []
...
--
Terry Hancock ([EMAIL PROTECTED])
Anansi Spaceworks http://www.AnansiSpaceworks.com
--
http://mail.python.org/mailman/listinfo/python-list