Robert Latest wrote:
> Paul Bryan wrote:
>> Adding to this, there should be no reason now in recent versions of
>> Python to ever use line continuation. Black goes so far as to state
>> "backslashes are bad and should never be used":
>>
>> https://black.readthedocs.io/en/stable/the_black_code_style
Paul Bryan wrote:
> Adding to this, there should be no reason now in recent versions of
> Python to ever use line continuation. Black goes so far as to state
> "backslashes are bad and should never be used":
>
> https://black.readthedocs.io/en/stable/the_black_code_style/
future_style.html#using-
Edmondo Giovannozzi wrote:
> Il giorno mercoledì 22 febbraio 2023 alle 09:50:14 UTC+1 Robert Latest ha
> scritto:
>> I found myself building a complicated logical condition with many ands and
>> ors which I made more manageable by putting the various terms on individual
>> lines and breaking them w
On 25/02/2023 10.04, Mark Bourne wrote:
Personally, I don't particularly like the way you have to put multiline
strings on the far left (rather than aligned with the rest of the scope)
to avoid getting spaces at the beginning of each line. I find it makes
it more difficult to see where the sco
Mark Bourne schreef op 24/02/2023 om 22:04:
Personally, I don't particularly like the way you have to put multiline
strings on the far left (rather than aligned with the rest of the scope)
to avoid getting spaces at the beginning of each line. I find it makes
it more difficult to see where the s
Open spam\n"
HelpText += " Shift + Left click: Cook spam\n"
...
Or perhaps just dumping the multi-line text into a file beforehand and reading
that into a string!
def someFunc():
The backslash is not looking like such a bad idea! LOL!
-Original Message-
From
On 24/02/2023 12.45, Weatherby,Gerard wrote:
NB my PyCharm-settings grumble whenever I create an identifier which
is
only used once (and perhaps, soon after it was established). I
understand the (space) optimisation, but prefer to trade that for
'readability'.
It isn't "space". Got an example
ld react if you used:
self.LEGAL_AGE_US = 21
-Original Message-
From: Python-list On
Behalf Of dn via Python-list
Sent: Thursday, February 23, 2023 9:01 PM
To: python-list@python.org
Subject: Re: Line continuation and comments
On 24/02/2023 12.45, Weatherby,Gerard wrote:
> “
> NB my PyCharm-s
On 24/02/2023 12.45, Weatherby,Gerard wrote:
“
NB my PyCharm-settings grumble whenever I create an identifier which is
only used once (and perhaps, soon after it was established). I
understand the (space) optimisation, but prefer to trade that for
'readability'.
“
I haven’t seen that one. What I
dult( self )->bool:
LEGAL_AGE_US = 21
return LEGAL_AGE
It doesn’t like LEGAL_AGE_US being all caps if declared in a function.
From: Python-list on
behalf of dn via Python-list
Date: Thursday, February 23, 2023 at 5:46 PM
To: python-list@python.org
Subject: Re: Line continuation
On 22/02/2023 21.49, Robert Latest via Python-list wrote:
I found myself building a complicated logical condition with many ands and ors
which I made more manageable by putting the various terms on individual lines
and breaking them with the "\" line continuation character. In this context it
wou
ps just dumping the multi-line text into a file beforehand and reading
that into a string!
def someFunc():
The backslash is not looking like such a bad idea! LOL!
-Original Message-
From: Python-list On
Behalf Of Rob Cliffe via Python-list
Sent: Wednesday, February 22, 2023 2:08 PM
To:
On 22/02/2023 15:23, Paul Bryan wrote:
Adding to this, there should be no reason now in recent versions of
Python to ever use line continuation. Black goes so far as to state
"backslashes are bad and should never be used":
https://black.readthedocs.io/en/stable/the_black_code_style/future_styl
On 22Feb2023 11:27, Thomas Passin wrote:
On 2/22/2023 10:02 AM, Weatherby,Gerard wrote:
That’s a neat tip. End of line comments work, too
x = (3 > 4 #never
and 7 == 7 # hopefully
or datetime.datetime.now().day > 15 # sometimes
)
print(x)
I find myself doing this more and mor
vannozzi
Date: Wednesday, February 22, 2023 at 9:40 AM
To: python-list@python.org
Subject: Re: Line continuation and comments
*** Attention: This is an external email. Use caution responding, opening
attachments or clicking on links. ***
Il giorno mercoledì 22 febbraio 2023 alle 09:50:14 UTC+1
on.org
Subject: Re: Line continuation and comments
*** Attention: This is an external email. Use caution responding, opening
attachments or clicking on links. ***
Il giorno mercoledì 22 febbraio 2023 alle 09:50:14 UTC+1 Robert Latest ha
scritto:
> I found myself building a complicated logical
Adding to this, there should be no reason now in recent versions of
Python to ever use line continuation. Black goes so far as to state
"backslashes are bad and should never be used":
https://black.readthedocs.io/en/stable/the_black_code_style/future_style.html#using-backslashes-for-with-statement
Il giorno mercoledì 22 febbraio 2023 alle 09:50:14 UTC+1 Robert Latest ha
scritto:
> I found myself building a complicated logical condition with many ands and
> ors
> which I made more manageable by putting the various terms on individual lines
> and breaking them with the "\" line continuatio
I found myself building a complicated logical condition with many ands and ors
which I made more manageable by putting the various terms on individual lines
and breaking them with the "\" line continuation character. In this context it
would have been nice to be able to add comments to lines terms
19 matches
Mail list logo