Re: Re: sum() vs. loop

2021-10-12 Thread Chris Angelico
On Wed, Oct 13, 2021 at 12:36 PM Avi Gross via Python-list wrote: > > Alan, > > I am also wondering about that zip() function call to bind the two lists > into a sort of iterator object. Presumably that calls the iterator N times. > I did a test where I made two list called A and B and used zip to

RE: Re: sum() vs. loop

2021-10-12 Thread Avi Gross via Python-list
Alan, I am also wondering about that zip() function call to bind the two lists into a sort of iterator object. Presumably that calls the iterator N times. I did a test where I made two list called A and B and used zip to make an object holding the two and then removed A and B. I was able to print

Re: sum() vs. loop

2021-10-12 Thread Christian Gollwitzer
Am 12.10.21 um 05:41 schrieb Dan Stromberg: On Mon, Oct 11, 2021 at 2:54 PM Steve Keller wrote: I have found the sum() function to be much slower than to loop over the operands myself: def sum_products(seq1, seq2): return sum([a * b for a, b in zip(seq1, seq2)]) def sum_products2(seq1,

Fwd: Re: sum() vs. loop

2021-10-12 Thread Alan Gauld
On 10/10/2021 09:49, Steve Keller wrote: > I have found the sum() function to be much slower than to loop over the > operands myself: > > def sum_products(seq1, seq2): > return sum([a * b for a, b in zip(seq1, seq2)]) > > def sum_products2(seq1, seq2): > sum = 0 > for a, b in zip(seq1, seq2): > s

Re: Mailing list activity low

2021-10-12 Thread David Lowry-Duda
> Have I missed something and has the maillinglist been moved. Activity > is very low here, about one message every five days. I think you might need to check how you access the mailing list. There have been more than 5 messages in the last day. See for example the archives: https://mail.pyth

Re: Mailing list activity low

2021-10-12 Thread MRAB
On 2021-10-12 09:06, Antoon Pardon wrote: Have I missed something and has the maillinglist been moved. Activity is very low here, about one message every five days. I've had some messages delayed, but activity has been normal otherwise. -- https://mail.python.org/mailman/listinfo/python-list

Re: installazione numpy

2021-10-12 Thread Peter Pearson
On Mon, 11 Oct 2021 07:56:27 +0200, stefano felli wrote: > l'installazione di numpy con > pip install numpy > fornisce errore > Building wheel for numpy (PEP 517) > > ERROR: Failed building wheel for numpy > Failed to build numpy > ERROR: Could not build wheels for numpy which use PEP 517 and can

Re: nrfutil icorrect installation

2021-10-12 Thread Peter Pearson
On Fri, 8 Oct 2021 14:46:34 -0500, Gerhard van Rensburg wrote: > > I installed Python 3.10.0 > I then install > pip install nrfutil > > When I try to run nrfutil, I get > ModuleNotFoundError: No module named 'constants' I just asked duckduckgo.com about "nrfutil constants", and got this helpful-lo

Mailing list activity low

2021-10-12 Thread Antoon Pardon
Have I missed something and has the maillinglist been moved. Activity is very low here, about one message every five days. Antoon Pardon. -- https://mail.python.org/mailman/listinfo/python-list

EuroPython 2021: All edited videos now available

2021-10-12 Thread Marc-Andre Lemburg
We’re happy to release another batch of 41 cut videos of EuroPython 2021 covering the third day sessions of the conference and a number of edited videos for the previous days. In total, we now have 118 videos waiting for you. You can watch them on our YouTube channel. We have created a EuroPython 2

Re: Connecting to MS accdb and read data into Pandas

2021-10-12 Thread MRAB
On 2021-10-12 09:40, Shaozhong SHI wrote: I tried the following code: import pyodbc conn = pyodbc.connect(r'Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=D:\my.accdb;') cursor = conn.cursor() cursor.execute('select * from table_name') for row in cursor.fetchall(): print (row) But

Connecting to MS accdb and read data into Pandas

2021-10-12 Thread Shaozhong SHI
I tried the following code: import pyodbc conn = pyodbc.connect(r'Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=D:\my.accdb;') cursor = conn.cursor() cursor.execute('select * from table_name') for row in cursor.fetchall(): print (row) But I could not connect to .accdb. What is the