list_a-list_b
Bengt Richter
bokr at oz.net
Wed Apr 17 16:21:16 EDT 2002
On 17 Apr 2002 10:21:46 GMT, Philip Swartzleonard <starx at pacbell.net> wrote:
[...]
>Tim Peters || Tue 16 Apr 2002 10:54:56p:
[...]
>>
>> though. Contrary to popular belief, there's no Fabulous Prize
>> awaiting those who minimize either vertical or horizontal space
>> <wink>.
>
>Minimizing relative vertical space is great; that's why list
>comprehensions are better than nested for loops for expressing simple
>ideas ('i want var to be an x by y matrix of foozles' =), and why moving
>stuff into subfunctions is nice. Horizontal space though... feh. Unless
>you're using emacs default python mode, in a two or three level deep
>looping structre in a function in a class, and you need to write
>'self.data[x][y].variable = self.long_function_name( lots, of, arguments
>)' ... =)
If you want the form but not the looong one-liner:
self.data[x][y].variable = (
self.long_function_name(
lots,
of,
arguments
)
)
Hm, this makes me wonder if '=' could introduce an optionally indented expression block,
using ident/dedent where the above is using = ( .. )
Regards,
Bengt Richter
More information about the Python-list
mailing list