Re: Evaluate once or every time

2023-02-24 Thread Thomas Passin
On 2/24/2023 7:00 PM, 2qdxy4rzwzuui...@potatochowder.com wrote: On 2023-02-24 at 18:42:39 -0500, Thomas Passin wrote: VOWELS = 'aeiouAEIOU' is_vowel = 'y' in VOWELS If I really needed them to be in a list, I'd probably do a list comprehension: VOWEL_LIST = [ch for ch in VOWELS] Why use a

Re: Evaluate once or every time

2023-02-24 Thread 2QdxY4RzWzUUiLuE
On 2023-02-24 at 18:42:39 -0500, Thomas Passin wrote: > VOWELS = 'aeiouAEIOU' > is_vowel = 'y' in VOWELS > > If I really needed them to be in a list, I'd probably do a list > comprehension: > > VOWEL_LIST = [ch for ch in VOWELS] Why use a comprehension when a simple loop will do? ;-) No.

Re: Evaluate once or every time

2023-02-24 Thread Thomas Passin
On 2/24/2023 5:35 PM, avi.e.gr...@gmail.com wrote: Mark, I was very interested in the point you made and have never thought much about string concatenation this way but adjacency is an operator worth using. This message has a new subject line as it is not about line continuation or comments.

Re: Evaluate once or every time

2023-02-24 Thread Chris Angelico
On Sat, 25 Feb 2023 at 09:36, wrote: > From what you say, concatenation between visibly adjacent strings is done > once when generating bytecode. Using a plus is supposed to be about the same > but may indeed result in either an error if you use anything other than a > string literal > > bad =

Evaluate once or every time

2023-02-24 Thread avi.e.gross
Mark, I was very interested in the point you made and have never thought much about string concatenation this way but adjacency is an operator worth using. This message has a new subject line as it is not about line continuation or comments. From what you say, concatenation between visibly