On Wed, Nov 14, 2012 at 10:12 AM, Mark Adam <[email protected]> wrote:
> On Wed, Nov 14, 2012 at 3:12 AM, Chris Withers <[email protected]> wrote:
>> Hi All,
>>
>> A colleague pointed me at Doug's excellent article here:
>> ...which made me a little sad, I suspect I'm not the only one who finds:
>>
>> a_dict = dict(
>> x = 1,
>> y = 2,
>> z = 3,
>> ...
>> )
>>
>> ...easier to read than:
>>
>> a_dict = {
>> 'x':1,
>> 'y':2,
>> 'z':3,
>> ...
>> }
>
> Hey, it makes me a little sad that dict breaks convention by allowing
> the use of unquoted characters (which everywhere else looks like
> variable names) just for a silly typing optimization.
What convention and typing optimization is this? I hope you aren't
suggesting it should be dict("x"=1) or dict("x":1)?
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com