celery multi celery.exceptions.TimeoutError: The operation timed out

2020-09-21 Thread iMath
Asked 3 days ago at https://stackoverflow.com/questions/63951696/celery-multi-celery-exceptions-timeouterror-the-operation-timed-out But nobody helped yet, anyone ? -- https://mail.python.org/mailman/listinfo/python-list

Pythonic style

2020-09-21 Thread Stavros Macrakis
I'm trying to improve my Python style. Consider a simple function which returns the first element of an iterable if it has exactly one element, and throws an exception otherwise. It should work even if the iterable doesn't terminate. I've written this function in multiple ways, all of which feel a

RE: Issues with pip in Python 3.8.3

2020-09-21 Thread Hylton
Hello, � I have subscribed to the Python list. The user name (which was optional) I entered as hsb3852, not my real name. Does this matter? � My question is below… � Best regards, Hylton � From: Hylton Sent: Monday, September 21, 2020 6:41 AM To: python-list@python.org Subject: Iss

Re: celery multi celery.exceptions.TimeoutError: The operation timed out

2020-09-21 Thread Menno Holscher
Op 21-09-2020 om 12:14 schreef iMath: Asked 3 days ago at https://stackoverflow.com/questions/63951696/celery-multi-celery-exceptions-timeouterror-the-operation-timed-out But nobody helped yet, anyone ? Did you see https://stackoverflow.com/questions/9769496/celery-received-unregistered-task-

Re: Puzzling difference between lists and tuples

2020-09-21 Thread Serhiy Storchaka
18.09.20 03:55, Chris Angelico пише: > On Fri, Sep 18, 2020 at 10:53 AM Grant Edwards > wrote: >> Yea, the syntax for tuple literals has always been a bit of an ugly >> spot in Python. If ASCII had only had one more set of open/close >> brackets... > > ... then I'd prefer them to be used for set

Re: Puzzling difference between lists and tuples

2020-09-21 Thread Chris Angelico
On Mon, Sep 21, 2020 at 10:14 PM Serhiy Storchaka wrote: > > 18.09.20 03:55, Chris Angelico пише: > > On Fri, Sep 18, 2020 at 10:53 AM Grant Edwards > > wrote: > >> Yea, the syntax for tuple literals has always been a bit of an ugly > >> spot in Python. If ASCII had only had one more set of open

Re: Pythonic style

2020-09-21 Thread Léo El Amri via Python-list
On 21/09/2020 00:34, Stavros Macrakis wrote: > I'm trying to improve my Python style. > > Consider a simple function which returns the first element of an iterable > if it has exactly one element, and throws an exception otherwise. It should > work even if the iterable doesn't terminate. I've writ

Re: Pythonic style

2020-09-21 Thread Tim Chase
On 2020-09-20 18:34, Stavros Macrakis wrote: > Consider a simple function which returns the first element of an > iterable if it has exactly one element, and throws an exception > otherwise. It should work even if the iterable doesn't terminate. > I've written this function in multiple ways, all of

Re: Pythonic style

2020-09-21 Thread Chris Angelico
On Mon, Sep 21, 2020 at 11:37 PM Tim Chase wrote: > > On 2020-09-20 18:34, Stavros Macrakis wrote: > > Consider a simple function which returns the first element of an > > iterable if it has exactly one element, and throws an exception > > otherwise. It should work even if the iterable doesn't ter

Re: Pythonic style

2020-09-21 Thread Léo El Amri via Python-list
On 21/09/2020 15:15, Tim Chase wrote: > You can use tuple unpacking assignment and Python will take care of > the rest for you: > > so you can do > > def fn(iterable): > x, = iterable > return x > > I'm not sure it qualifies as Pythonic, but it uses Pythonic features > like tuple unpac

Re: Pythonic style

2020-09-21 Thread Tim Chase
On 2020-09-21 09:48, Stavros Macrakis wrote: >> def fn(iterable): >> x, = iterable >> return x > > Thanks, Tim! I didn't realize that you could write (x,) on the LHS! > Very nice, very Pythonic! It also expands nicely for other cases, so you want the 3-and-only-3 first values with errors

Re: Pythonic style

2020-09-21 Thread Frank Millman
On 2020-09-21 3:46 PM, Chris Angelico wrote: On Mon, Sep 21, 2020 at 11:37 PM Tim Chase wrote: On 2020-09-20 18:34, Stavros Macrakis wrote: Consider a simple function which returns the first element of an iterable if it has exactly one element, and throws an exception otherwise. It should wor

Re: Pythonic style

2020-09-21 Thread Terry Reedy
On 9/20/2020 6:34 PM, Stavros Macrakis wrote: I'm trying to improve my Python style. Consider a simple function which returns the first element of an iterable if it has exactly one element, and throws an exception otherwise. It should work even if the iterable doesn't terminate. I've written thi

Re: Making Python the Best App Dev Platform

2020-09-21 Thread Bonface M. K.
Hi! gMail writes: > Hello, All > > We all know Python is a wonderful environment, > with fantastic packages for App Dev like Flask, > SQLAlchemy and Django. Now let’s make it the only > reasonable choice for building database-oriented > systems. > > I’d like to introduce 2 new capabilities: > >

Re: Pythonic style

2020-09-21 Thread Stavros Macrakis
Thanks, Tim! I didn't realize that you could write (x,) on the LHS! Very nice, very Pythonic! -s On Mon, Sep 21, 2020 at 9:15 AM Tim Chase wrote: > On 2020-09-20 18:34, Stavros Macrakis wrote: > > Consider a simple function which returns the first element of an > > iterable if it

Re: Making Python the Best App Dev Platform

2020-09-21 Thread Bonface M. K.
[[Cc'ing the python list for other people to give useful feedback if they can]] gMail writes: > Hi! > > Loved your no-place-like-home joke. > Thanks! > Wanted to better understand your question / comment about testing. > From my understanding of what the project does(I haven't really had a