On 27-Aug-11 11:53 AM, Hans Mulder wrote:
On 27/08/11 17:16:51, Colin J. Williams wrote:
What about:
cond= isinstance(left, PyCompare)
and isinstance(right, PyCompare)
and left.complist[-1] is right.complist[0]
py_and= PyCompare(left.complist + right.complist[1:])if cond
else: py_and = PyBoolea
In article ,
Arnaud Delobelle wrote:
> Hi all,
>
> I'm wondering what advice you have about formatting if statements with
> long conditions (I always format my code to <80 colums)
> [...]
> if (isinstance(left, PyCompare) and isinstance(right, PyCompare)
> and left.compl
On 27/08/11 17:16:51, Colin J. Williams wrote:
What about:
cond= isinstance(left, PyCompare)
and isinstance(right, PyCompare)
and left.complist[-1] is right.complist[0]
py_and= PyCompare(left.complist + right.complist[1:])if cond
else: py_and = PyBooleanAnd(left, right)
Colin W
On 27-Aug-11 03:50 AM, Hans Mulder wrote:
On 27/08/11 09:08:20, Arnaud Delobelle wrote:
I'm wondering what advice you have about formatting if statements with
long conditions (I always format my code to<80 colums)
Here's an example taken from something I'm writing at the moment and
how I've for
Steven D'Aprano writes:
> I believe that PEP 8 now
Specifically the “Indentation” section contains::
When using a hanging indent the following considerations should be
applied; there should be no arguments on the first line and further
indentation should be used to clearly distingui
On 27/08/11 11:05:25, Steven D'Aprano wrote:
Hans Mulder wrote:
[...]
It may look ugly, but it's very clear where the condition part ends
and the 'then' part begins.
Immediately after the colon, surely?
On the next line, actually :-)
The point is, that this layout makes it very clear that
On 27 August 2011 08:24, Steven D'Aprano
wrote:
> Arnaud Delobelle wrote:
>
>> Hi all,
>>
>> I'm wondering what advice you have about formatting if statements with
>> long conditions (I always format my code to <80 colums)
>>
>> Here's an example taken from something I'm writing at the moment and
Hans Mulder wrote:
[...]
> It may look ugly, but it's very clear where the condition part ends
> and the 'then' part begins.
Immediately after the colon, surely?
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
On 27/08/11 09:08:20, Arnaud Delobelle wrote:
I'm wondering what advice you have about formatting if statements with
long conditions (I always format my code to<80 colums)
Here's an example taken from something I'm writing at the moment and
how I've formatted it:
if (isinstance(left,
Arnaud Delobelle wrote:
> Hi all,
>
> I'm wondering what advice you have about formatting if statements with
> long conditions (I always format my code to <80 colums)
>
> Here's an example taken from something I'm writing at the moment and
> how I've formatted it:
>
>
> if (isinstance(
Hi all,
I'm wondering what advice you have about formatting if statements with
long conditions (I always format my code to <80 colums)
Here's an example taken from something I'm writing at the moment and
how I've formatted it:
if (isinstance(left, PyCompare) and isinstance(right, PyComp
11 matches
Mail list logo