Suppose I define a class:
class Foo(object):
#
children = []
#
def __init__(self, *args, **kw):
if kw:
self.__dict__.update(kw)
if args:
self.chidlren = list(args)
In current syntax I have to write the folowing "initialization" code:
foo = \
Foo(
Foo(
Foo(x=3,y=4),
Foo(x=5,y=6),
x=4, y=5
),
x=1, y=2
)
I can't write this code as follows (it seems more natural for me):
foo = \
Foo(
x=1, y=2,
Foo(
x=4, y=5,
Foo(x=3,y=4),
Foo(x=5,y=6))
)
)
Would be desirable to allow two equivalent forms of calling syntax in python:
<caller>(<positional_arguments>, <keyword_arguments>)
and
<caller>(<keyword_arguments>, <positional_arguments>)
?
Best regards,
Zaur