<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>On Sep 16, 2015, at 21:07, John Wong <<a href="mailto:gokoproject@gmail.com">gokoproject@gmail.com</a>> wrote:</div><div><br></div><blockquote type="cite"><div>So here I am, thinking, what if we can do this?</div><div><br></div><div>response(</div><div>    ["DescribeDBSnapshotsResponse"]</div><div>    ["DescribeDBSnapshotsResult"]</div><div>)</div></blockquote><div><br></div><div>This already has a perfectly valid meaning: you have a list of one string, you're indexing it with another string, and passing the result to a function. If this isn't obvious, try this example:</div><div><br></div><div>    frobulate(['a', 'e', 'i', 'o', 'u'][vowel])</div><div><br></div><div>So, giving it a second meaning would be ambiguous.</div><div><br></div><div>Also, there's already a perfectly good way to write what you want. (Actually two, because square brackets continue the exact same way parens do, but I wouldn't recommend that here.)</div><div><br></div><div><div><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">    (response</span></font></div><div><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">     ["DescribeDBSnapshotsResponse"]</span></font></div><div><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">     ["DescribeDBSnapshotsResult"]</span></font></div><div><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">    )</span></font></div></div><div><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);"><br></span></font></div><div><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">That looks no uglier than your suggestion, and a lot less ugly when buried inside a larger expression.</span></font></div><div><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);"><br></span></font></div><div><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">(I think it might look nicer to indent the bracketed keys, but I think that technically violates PEP 8.)</span></font></div><br><blockquote type="cite"><div></div></blockquote></body></html>