<div dir="ltr">I personally made my own "namedtuple" "literal"<div><br></div><div><div>class Container:</div><div>    pass</div><div><br></div><div>def t(**kw):</div><div>    c = Container()</div><div>    for k, w in kw.items():</div>

<div>        setattr(c, k, w)</div><div>    return c</div></div><div><br></div><div>t(color=c, position=p)</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 1, 2014 at 9:55 PM, Eric Snow <span dir="ltr"><<a href="mailto:ericsnowcurrently@gmail.com" target="_blank">ericsnowcurrently@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On Tue, Apr 1, 2014 at 10:40 PM, Eric Snow <<a href="mailto:ericsnowcurrently@gmail.com">ericsnowcurrently@gmail.com</a>> wrote:<br>


> (Inspired by <a href="https://mail.python.org/pipermail/python-ideas/2010-October/008532.html" target="_blank">https://mail.python.org/pipermail/python-ideas/2010-October/008532.html</a>)<br>
><br>
> (color: c, position: p)<br>
><br>
> This would automatically created a namedtuple class and provide an<br>
> instance of it.<br>
<br>
</div>Ooh.  How about an OrderedDict literal:<br>
<br>
['a' : 1, 'b' : 2, 'c' : 3]<br>
<br>
(courtesy of <a href="https://mail.python.org/pipermail/python-ideas/2010-October/008484.html" target="_blank">https://mail.python.org/pipermail/python-ideas/2010-October/008484.html</a>)<br>
<br>
reading-too-many-archived-threads-ly,<br>
<br>
-eric<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" target="_blank">http://python.org/psf/codeofconduct/</a><br>
</div></div></blockquote></div><br></div>