Re: Style for docstring

2022-04-23 Thread jan via Python-list
"return true iff this". I like this. jan On 23/04/2022, Stefan Ram wrote: > Rob Cliffe writes: >>I'm curious as to why so many people prefer "Return" to "Returns". > > The commands, er, names of functions, use the imperative mood > ("print", not "prints"). So, "return" aligns with that moo

Re: new sorting algorithm

2022-05-02 Thread jan via Python-list
Hi, > The median-of-three partitioning technique makes that work reasonably well, so it won't be pathologically slow Just to be clear because I've wondered but haven't looked into it, we know naive quicksorting of already-sorted data is pathalogical, but median-of-3 is known to fix this pathology

Python install failing. Install log is available.

2021-05-20 Thread jan via Python-list
Hi, I've usually had problems installing python, typically pip breaking. This time it's simply not installing correctly when run as administrator, and not at all when run as non-administrator. As administrator, it's not installing for other users as I believe it should. It's certainly not addin

Re: Python install failing. Install log is available.

2021-05-21 Thread jan via Python-list
/20/2021 7:06 AM, jan via Python-list wrote: > >> This time it's simply not installing correctly when run as >> administrator, and not at all when run as non-administrator. >> >> As administrator, it's not installing for other users as I believe it >> shou

Re: Terminology: EU language skills, and Master to Main (or ...)

2021-06-13 Thread jan via Python-list
Hi, see below On 13/06/2021, dn via Python-list wrote: > [to folk subscribed to both the Python list and Python-Tutor: apologies > for cross-posting] > > > Regarding levels of skill or complexity in learning, the European Union > has been working on "The Common European Framework of Reference for

Re: Optimizing Small Python Code

2021-06-24 Thread jan via Python-list
If I'm not mistaken, the original output is O(n^2) in quantity of chars, and as output time is proportional to the length of the output, that makes the output time also O(n^2) here too. So I guess this only looks like it's reduced to linear because the output here is very small. For large n it wou

Re: Optimizing Small Python Code

2021-06-24 Thread jan via Python-list
You're right, I was making an academic point. I think this whole compression question relates to Kolmogorov complexity "In algorithmic information theory (a subfield of computer science and mathematics), the Kolmogorov complexity of an object,