[EMAIL PROTECTED] wrote:

> I'd like to do it in one line because what I am trying to do is,
> after all, a single, simple enough action. 

No, it's two actions: 

1. You extract a list of keys from the dict
2. you sort it

> I find the suggested b = sorted(a.keys()) much more readable than
> breaking it up in two lines. In the long run, I guess it's a
> matter of personal taste... 

Yes. You'll see, at least if you do a third thing with the list it
will start to become less well-readable.

Regards,


Björn

-- 
BOFH excuse #450:

Terrorists crashed an airplane into the server room, have to
remove /bin/laden. (rm -rf /bin/laden)

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to