important
details this way seems to be good. Not sure about run-time efficiency, of
course.
-Original Message-
From: Tutor On Behalf Of
Steven D'Aprano
Sent: Friday, December 14, 2018 12:22 AM
To: tutor@python.org
Subject: Re: [Tutor] Long Lines techniques
On Thu, Dec 13, 2018 at
even if it expanded to much more.
-Original Message-
From: Tutor On Behalf Of
Steven D'Aprano
Sent: Thursday, December 13, 2018 7:27 PM
To: tutor@python.org
Subject: Re: [Tutor] Long Lines techniques
On Thu, Dec 13, 2018 at 12:36:27PM -0500, Avi Gross wrote:
> Simple question:
On Thu, Dec 13, 2018 at 11:07:59PM -0500, Avi Gross wrote:
[...]
> There are cases where it may make sense to have a long like connected by AND
> or OR given how python does short-circuiting while returning the last thing
> or two it touched instead of an actual True/False. For example, you may wa
On Fri, Dec 14, 2018 at 01:03:55AM +, Alan Gauld via Tutor wrote:
> I'd probably suggest
>
> stgs = ''.join([
> "long string",
> "another string",
> ...
> "last string"
> ])
That's certainly better than using the + operator, as that will be quite
inefficient for large numbers of strings. Bu
ould allow tricks like this in a pre-processor.
From: Bob Gailer
Sent: Thursday, December 13, 2018 2:33 PM
To: Avi Gross
Cc: tutor@python.org
Subject: Re: [Tutor] Long Lines techniques
On Dec 13, 2018 1:51 PM, "Avi Gross" mailto:avigr...@verizon.net> > wrote:
>
> Simp
On 13/12/2018 17:36, Avi Gross wrote:
> When lines get long, what points does splitting them make sense and what
> methods are preferred?
Its down to personal preference and convenience
plus a smidge of idiom.
> Yes, I am aware of ways to break up something long by breaking in into
> multiple st
On Thu, Dec 13, 2018 at 12:36:27PM -0500, Avi Gross wrote:
> Simple question:
>
> When lines get long, what points does splitting them make sense and what
> methods are preferred?
Good question!
First, some background:
Long lines are a potential code smell: a possible sign of excessively
ters
On 13/12/2018 19:33, Bob Gailer wrote:
On Dec 13, 2018 1:51 PM, "Avi Gross" wrote:
Simple question:
Avi: when I see an email from you I tend to ignore it because it always
seems to lead to something that is long, time consuming and complex. Would
you consider finding ways to make your questi
On Dec 13, 2018 1:51 PM, "Avi Gross" wrote:
>
> Simple question:
Avi: when I see an email from you I tend to ignore it because it always
seems to lead to something that is long, time consuming and complex. Would
you consider finding ways to make your questions or comments a lot briefer?
I will b
Simple question:
When lines get long, what points does splitting them make sense and what
methods are preferred?
Details.
I am used to many languages where you can continue a statement across
multiple lines. What they share in common is the fact they do not use
indenting for the use Pyt
10 matches
Mail list logo