Date: Sat, 18 Dec 2010 12:45:49 +0100 From: spir
To: python-ideas@python.org Subject: Re: [Python-ideas] ML Style Pattern Matching for Python Message-ID: <20101218124549.35a0d1c9@o> Content-Type: text/plain; charset=UTF-8 On Sat, 18 Dec 2010 12:23:45 +0100 Eike Welk
wrote:
...
I want composite object literal notation as well. But certainly not {| a=1, b=2 |}. Rather (a=1, b=2) or (a:1, b:2). Untyped case would created an instance of Object (but since as of now they can't have attrs, there should be another modif), or of a new FreeObject subtype of Object.
...
Denis
"(a=1, b=2) or (a:1, b:2)" These look to me like they should produce a named-tuple instance. I usually just use: ... class Simple(object): ... def __init__(self, **kwargs): ... self.__dict__.update(kwargs) ... Simple(a=1,b=2) -Mark