pre-PEP: Suite-Based Keywords
Ron_Adam
radam2_ at _tampabay.rr.com
Mon Apr 18 12:34:28 EDT 2005
On Mon, 18 Apr 2005 12:50:24 +0200, Reinhold Birkenfeld
<reinhold-birkenfeld-nospam at wolke7.net> wrote:
>y = (f(11, 22, x=1, y='y for f') *
> g(*args_from_somewhere,
> x='x for g', y='y for g',
> foo=lambda: return 'foo for g'))
>
>would be my current way to express this. But still, the less lines,
>the less confusing it is.
I would probably do it this way.
y = f(11, 22, x=1, y='y for f') \
* g( *args_from_somewhere,
x='x for g',
y='y for g',
foo=lambda: return 'foo for g' )
I tend to put the opperators on the left for continued lines. It's
nice visual que to whats happening.
if (a==1
or b==2
or c==3):
x = ( 1.333333333333
+ the_last_value_i_needed
+ the_first_value_i_started_with
+ another_long_name_for_something )
This subject really hasn't been a problem for me. So I really don't
see the point of adding a new syntax.
And this works on the def side.
def f( first,
second,
x=0,
y='' ):
#
# rest of body
#
So is this new syntax just a way to keep the '()'s closer together?
Cheers,
Ron
More information about the Python-list
mailing list