Stefan Ram wrote:
Mark Bourne wrote or quoted:
I don't think there's a tuple being created. If you mean:
( word for word in list_ if word[ 0 ]== 'e' )
...that's not creating a tuple. It's a generator expression, which
generates the next value each time it's called for. If you only ever
for it to be kept hanging around in memory.
Perhaps worse, imagine doing the search in parallel and as sone as it is found
anywhere, ...
-Original Message-
From: Python-list On
Behalf Of Mark Bourne via Python-list
Sent: Thursday, April 4, 2024 3:04 PM
To: python-list@python.org
Subj
On 4/4/2024 3:03 PM, Mark Bourne via Python-list wrote:
Thomas Passin wrote:
On 4/2/2024 1:47 PM, Piergiorgio Sartor via Python-list wrote:
On 02/04/2024 19.18, Stefan Ram wrote:
Some people can't believe it when I say that chatbots improve
my programming productivity. So, here's a techn
, ...
-Original Message-
From: Python-list On
Behalf Of Mark Bourne via Python-list
Sent: Thursday, April 4, 2024 3:04 PM
To: python-list@python.org
Subject: Re: A technique from a chatbot
Thomas Passin wrote:
> On 4/2/2024 1:47 PM, Piergiorgio Sartor via Python-list wrote:
>> On 0
Thomas Passin wrote:
On 4/2/2024 1:47 PM, Piergiorgio Sartor via Python-list wrote:
On 02/04/2024 19.18, Stefan Ram wrote:
Some people can't believe it when I say that chatbots improve
my programming productivity. So, here's a technique I learned
from a chatbot!
It is a structured "
On 03/04/2024 13.45, Gilmeh Serda wrote:
On 2 Apr 2024 17:18:16 GMT, Stefan Ram wrote:
first_word_beginning_with_e
Here's another one:
def ret_first_eword():
... return [w for w in ['delta', 'epsilon', 'zeta', 'eta', 'theta'] if
w.startswith('e')][0]
...
ret_first_eword()
'epsilon'
r...@zedat.fu-berlin.de (Stefan Ram) writes:
> It can lead to errors:
>
> def first_word_beginning_with_e( list_ ):
> for word in list_:
> if word[ 0 ]== 'e': return word
> something_to_be_done_at_the_end_of_this_function()
>
> The call sometimes will not be executed here!
technique from a chatbot
On 4/3/2024 1:27 AM, AVI GROSS via Python-list wrote:
> I am a tad confused by a suggestion that any kind of GOTO variant is bad.
The suggestion runs counter to the reality that underneath it all, compiled
programs are chock full of GOTO variants even for simple things like
On 4/3/2024 1:27 AM, AVI GROSS via Python-list wrote:
I am a tad confused by a suggestion that any kind of GOTO variant is bad. The
suggestion runs counter to the reality that underneath it all, compiled
programs are chock full of GOTO variants even for simple things like IF-ELSE.
Consider the
#x27;e']) else None)
print(first_word_beginning_with_e( text ))
print(first_word_beginning_with_e( NorEaster ))
Result of running it on a version of python ay least 3.8 so it supports the
walrus operator:
eastern
None
-Original Message-
From: Python-list On
Behalf Of Thomas Pass
On 4/2/2024 1:47 PM, Piergiorgio Sartor via Python-list wrote:
On 02/04/2024 19.18, Stefan Ram wrote:
Some people can't believe it when I say that chatbots improve
my programming productivity. So, here's a technique I learned
from a chatbot!
It is a structured "break". "Break" still
On 02/04/2024 19.18, Stefan Ram wrote:
Some people can't believe it when I say that chatbots improve
my programming productivity. So, here's a technique I learned
from a chatbot!
It is a structured "break". "Break" still is a kind of jump,
you know?
So, what's a functio
12 matches
Mail list logo