2qdxy4rzwzuui...@potatochowder.com wrote:
On 2024-12-14 at 12:08:29 +,
Mark Bourne via Python-list wrote:
Martin Ruppert wrote:
Hi,
the division 0.4/7 provides a wrong result. It should give a periodic
decimal fraction with at most six digits, but it doesn't.
Below is the comparis
Martin Ruppert wrote:
Hi,
the division 0.4/7 provides a wrong result. It should give a periodic
decimal fraction with at most six digits, but it doesn't.
Below is the comparison of the result of decimal, mpmath, dc and calc.
0.0571428571428571460292086417861615440675190516880580357142857 decim
Albert-Jan Roskam wrote:
Today I used chardet.detect in the repl and it returned windows-1252
(incorrect, because it later resulted in a UnicodeDecodeError). When I ran
chardet as a script (which uses UniversalLineDetector) this returned
MacRoman. Isn't charset.detect the correct
Norman Robins wrote:
I'm somewhat new to mocking for unit tests.
I have some code like this:
In foo/bar/baz.py I have 2 function I want to mock, one calls the other"
def function1_to_mock():
.
.
.
def function2_to_mock():
function1_to_mock()
In foo/bar/main.py I import 1 of th
Stefan Ram wrote:
Mark Bourne wrote or quoted:
I don't think there's a tuple being created. If you mean:
( word for word in list_ if word[ 0 ]== 'e' )
...that's not creating a tuple. It's a generator expression, which
generates the next value each time it's called for. If you only ever
for it to be kept hanging around in memory.
Perhaps worse, imagine doing the search in parallel and as sone as it is found
anywhere, ...
-----Original Message-
From: Python-list On
Behalf Of Mark Bourne via Python-list
Sent: Thursday, April 4, 2024 3:04 PM
To: python-list@python.org
Subj
Thomas Passin wrote:
On 4/2/2024 1:47 PM, Piergiorgio Sartor via Python-list wrote:
On 02/04/2024 19.18, Stefan Ram wrote:
Some people can't believe it when I say that chatbots improve
my programming productivity. So, here's a technique I learned
from a chatbot!
It is a structured "
Stefan Ram wrote:
ast wrote or quoted:
Why did you renamed itertools as _itertools ?
Assume I have a module A.py:
import math
def f(): pass
. Assume I have an additional module B.py:
import A
. Now, when I'm editing "B.py" in IDLE and type "A.", IIRC
IDLE will offer me two pos
Thomas Nyberg wrote:
Hi,
Yeah so flask does support async (when installed with `pip3 install
flask[async]), but you are making a good point that flask in this case
is a distraction. Here's an example using just the standard library that
exhibits the same issue:
`app.py`
```
import asyncio
i
Loris Bennett wrote:
Hi,
I am using SQLAlchemy to extract some rows from a table of 'events'.
From the call to the DB I get a list of objects of the type
sqlalchemy.orm.state.InstanceState
I would like to print these rows to the terminal using the 'tabulate'
package, the documentation for
I've came across an issue with attaching a mock function to another mock
object. It looks like this might be a bug in unittest.mock, but it's
possible I'm misunderstanding or doing something wrong.
I'm currently using Python 3.8.10, which is the default installed on
Ubuntu 20.04. I don't hav
Roel Schroeven wrote:
Op 6/06/2023 om 16:08 schreef Chris Angelico:
On Wed, 7 Jun 2023 at 00:06, Neal Becker wrote:
>
> The following f-string does not parse and gives syntax error on 3.11.3:
>
> f'thruput/{"user" if opt.return else "cell"} vs. elevation\n'
>
> However this expression, which is
12 matches
Mail list logo