Re: pre-PEP: Suite-Based Keywords
- From: Ron_Adam <radam2_@xxxxxxxxxxxxxxxx>
- Date: Mon, 18 Apr 2005 16:34:28 GMT
On Mon, 18 Apr 2005 12:50:24 +0200, Reinhold Birkenfeld
<reinhold-birkenfeld-nospam@xxxxxxxxxx> 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
.
- References:
- pre-PEP: Suite-Based Keywords
- From: Brian Sabbey
- Re: pre-PEP: Suite-Based Keywords
- From: Reinhold Birkenfeld
- Re: pre-PEP: Suite-Based Keywords
- From: Brian Sabbey
- Re: pre-PEP: Suite-Based Keywords
- From: Bengt Richter
- Re: pre-PEP: Suite-Based Keywords
- From: Reinhold Birkenfeld
- Re: pre-PEP: Suite-Based Keywords
- From: Bengt Richter
- Re: pre-PEP: Suite-Based Keywords
- From: Reinhold Birkenfeld
- pre-PEP: Suite-Based Keywords
- Prev by Date: SQLite Database Manager
- Next by Date: Re: MS SQL Server/ODBC package for Python
- Previous by thread: Re: pre-PEP: Suite-Based Keywords
- Next by thread: Re: pre-PEP: Suite-Based Keywords
- Index(es):
Relevant Pages
|