Re: []=[]

2023-09-25 Thread Chris Angelico via Python-list
On Tue, 26 Sept 2023 at 02:52, Piergiorgio Sartor via Python-list wrote: > > On 23/09/2023 09.41, Stefan Ram wrote: > > r...@zedat.fu-berlin.de (Stefan Ram) writes: > >> []=[] > > > >I was watching a video of a David Beazley talk "Python > >Concurrency From the Ground Up" , where he wrote

Re: []=[]

2023-09-25 Thread Piergiorgio Sartor via Python-list
On 23/09/2023 09.41, Stefan Ram wrote: r...@zedat.fu-berlin.de (Stefan Ram) writes: []=[] I was watching a video of a David Beazley talk "Python Concurrency From the Ground Up" , where he wrote can_recv, can_send, [] = select(recv_wait, send_wait, []) . Later, he clarified that he a

Re: Using generator expressions

2023-09-25 Thread Chris Angelico via Python-list
On Tue, 26 Sept 2023 at 01:39, Jonathan Gossage via Python-list wrote: > > Many thanks, all. It turned out that my problem was not fully understanding > the use and power of the unpack operator *. Using it to activate my > generator made things start to work. I changed the line where I invoked the

Re: Using generator expressions

2023-09-25 Thread Jonathan Gossage via Python-list
Many thanks, all. It turned out that my problem was not fully understanding the use and power of the unpack operator *. Using it to activate my generator made things start to work. I changed the line where I invoked the generator to: y = test1(*(a for a in st)) adding the unpack operator. On

ANN: Python Meeting Düsseldorf - 27.09.2023

2023-09-25 Thread eGenix Team via Python-list
/This announcement is in German since it targets a local user group//meeting in Düsseldorf, Germany/ Ankündigung Python Meeting Düsseldorf - September 2023 Ein Treffen von Python Enthusiasten und Interes

Re: Using generator expressions

2023-09-25 Thread Thomas Passin via Python-list
On 9/25/2023 10:15 AM, Jonathan Gossage via Python-list wrote: I am having a problem using generator expressions to supply the arguments for a class instance initialization. The following example shows the problem: class test1(object): def __init__(self, a, b): self.name = a

Re: Using generator expressions

2023-09-25 Thread Dom Grigonis via Python-list
y = test1(*[a for a in st]) y = test1(*st) Maybe any of these would be ok for you? Regards, DG > On 25 Sep 2023, at 17:15, Jonathan Gossage via Python-list > wrote: > > I am having a problem using generator expressions to supply the arguments > for a class instance initialization. The followi

Using generator expressions

2023-09-25 Thread Jonathan Gossage via Python-list
I am having a problem using generator expressions to supply the arguments for a class instance initialization. The following example shows the problem: class test1(object): def __init__(self, a, b): > self.name = a self.value = b st = 'Programming Renaissance, Any'.split(', '