In message , J. Cliff
Dyer wrote:
> On Wed, 2009-07-01 at 17:19 +1200, Lawrence D'Oliveiro wrote:
>>
>> In message , J.
>> Cliff Dyer wrote:
>>
>> > If the lines got separated, a leading + could disappear into its line
>> > without any errors showing up. A trailing + would raise a syntax
>> > e
On Wed, 2009-07-01 at 17:19 +1200, Lawrence D'Oliveiro wrote:
> In message , J. Cliff
> Dyer wrote:
>
> > If the lines got separated, a leading + could disappear into its line
> > without any errors showing up. A trailing + would raise a syntax error.
>
> Unless, of course, it was moved onto th
In message , J. Cliff
Dyer wrote:
> If the lines got separated, a leading + could disappear into its line
> without any errors showing up. A trailing + would raise a syntax error.
Unless, of course, it was moved onto the previous line as part of whatever
caused the separation of the lines. How
Peter Billam wrote:
> On 2009-06-22, Lie Ryan wrote:
>> Ben Charrow wrote:
>>> value = foo.bar()['first'][0]*baz.quux(1, 2)[5:9] \
>>> + calculate_number(10, 20)*forbulate(500, 360)
>>> What is subtly wrong about this piece of code? I can't see any bugs and
>>> can't think of subtle gotch
On Mon, 2009-06-22 at 22:52 +, Peter Billam wrote:
> I wonder on what grounds PEP8
> says "The preferred place to break around a binary operator is
> *after* the operator" ?
> Perhaps it's just the "continutation marker" rationale?
>
> Regards, Peter
>
> --
> Peter Billam www.pjb.com
On Jun 21, 9:14 pm, Ben Charrow wrote:
> I have a question about the "Using Backslash to Continue Statements" in the
> howto "Idioms and Anti-Idioms in Python"
> (http://docs.python.org/howto/doanddont.html#using-backslash-to-contin...)
>
> It says:
>
> "...if the code was:
>
> value = foo.bar()['
En Mon, 22 Jun 2009 20:34:40 -0300, Miles Kaufmann
escribió:
On Jun 22, 2009, at 12:14 AM, Ben Charrow wrote:
What is subtly wrong about this piece of code? I can't see any bugs
and can't think of subtle gotchas (e.g. the '\' is removed or the lines
become separated, because in both cases
In message , Peter Billam wrote:
> Damian Conway, in Perl Best Practices, puts forward a clear argument
> for breaking *before* the operator:
Except in JavaScript, where you have no choice.
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 22, 2009, at 12:14 AM, Ben Charrow wrote:
What is subtly wrong about this piece of code? I can't see any bugs
and can't think of subtle gotchas (e.g. the '\' is removed or the
lines become separated, because in both cases an IndentationError
would be raised).
Perhaps, along with o
On 2009-06-22, Lie Ryan wrote:
> Ben Charrow wrote:
>> value = foo.bar()['first'][0]*baz.quux(1, 2)[5:9] \
>> + calculate_number(10, 20)*forbulate(500, 360)
>> What is subtly wrong about this piece of code? I can't see any bugs and
>> can't think of subtle gotchas (e.g. the '\' is removed
In message , Wilbert
Berendsen wrote:
> I' prefer:
>
> value = (foo.bar()['first'][0] * baz.quux(1, 2)[5:9] +
> calculate_number(10, 20) * forbulate(500, 360))
I prefer using a two-dimensional layout to make the expression
structure more obvious:
value = \
(
foo
Op maandag 22 juni 2009, schreef Lawrence D'Oliveiro:
> value = \
> (
> foo.bar()['first'][0] * baz.quux(1, 2)[5:9]
> +
> calculate_number(10, 20) * forbulate(500, 360)
> )
I' prefer:
value = (foo.bar()['first'][0] * baz.quux(1, 2)[5:9] +
c
In message , Lie Ryan
wrote:
> The preferred style is to put the binary operators before the line-break
> ...
Not by me. I prefer using a two-dimensional layout to make the expression
structure more obvious:
value = \
(
foo.bar()['first'][0] * baz.quux(1, 2)[5:9]
Ben Charrow wrote:
> I have a question about the "Using Backslash to Continue Statements" in
> the howto "Idioms and Anti-Idioms in Python"
> (http://docs.python.org/howto/doanddont.html#using-backslash-to-continue-statements)
>
>
> It says:
>
> "...if the code was:
>
> value = foo.bar()['first
On Mon, 22 Jun 2009 00:14:50 -0400, Ben Charrow wrote:
> I have a question about the "Using Backslash to Continue Statements" in
> the howto "Idioms and Anti-Idioms in Python"
> (http://docs.python.org/howto/doanddont.html#using-backslash-to-
continue-statements)
>
>
> It says:
>
> "...if the c
15 matches
Mail list logo