Interesting performance question

2019-09-29 Thread Anthony Flury via Python-list
I have just noticed an oddity : Using python 3.6 building a tuple like this : my_tuple = tuple([x*x for x in range(1,1000)]) is about 1/3 quicker than     my_tuple = tuple(x*x for x in range(1,1000)) Measurements : $  python3 -m timeit 'my_tuple = tuple([x*x for x in range(1,1000)])'

Extension Module for Python 3.6 +

2019-03-01 Thread Anthony Flury via Python-list
In my brave and noble quest to get to grips with the CAPI - I am trying to write a C extension module which provides a new class The exact details are not important, but what is important is that instances of my new class are imutable, and therefore from time to time, my extension module

Using PyArg_ParseTuple to with optional fields.

2019-02-28 Thread Anthony Flury via Python-list
I am trying to write an extension module with a function (actually an __init__ method, but I am not sure that matters) where the function can be called as either :     my_func() or     my_func( a, b, c, d) - where a,b,c,d are all doubles. I would prefer not to allow the function to be

Re: Encounter issues to install Python

2019-01-15 Thread Anthony Flury via Python-list
What error are you getting ? 'Can not install the software' isn't enough information for me to assist in detail In the mean time - things to check : * Does your user have permission to install to the directory you are trying to install to ? * Does the disk have enough disk space to

Side by side comparison - CPython, nuitka, PyPy

2018-12-21 Thread Anthony Flury via Python-list
I thought I would look at a side by side comparison of CPython, nuitka and PyPy *The functionality under test** * I have a library (called primelib) which implements a Sieve of Erathoneses in pure Python - it was orginally written as part of my project Euler attempts Not only does it build

Re: Encounter issues to install Python

2018-10-13 Thread Anthony Flury via Python-list
Olivier, Welcome to the list - before we can help you, we need some more information : * What Operating system are you using - Windows/Mac/Linux/Raspberry Pi/Android for something else ? * What command or installer did you use to try to install Python. * What issues did you have during

Re: Observations on the List - "Be More Kind"

2018-10-06 Thread Anthony Flury via Python-list
Bruce, I completely agree; it is worth everyone remember that we are all here (even the moderators) as volunteers; we are here because either we want to ask questions, or we want to learn, or we want to help. We do need to remember that the moderators is here to be nasty or because of a

Question about Multi-processing

2018-10-02 Thread Anthony Flury via Python-list
I decided to spend this morning to get my head around multi-processing, and decided to try to experiment initially in the command line interpreter, using the Python 3 documentation I fired up