On Fri, 18 Feb 2022 at 23:53, Steven D'Aprano wrote:
> When pip resolves dependencies, it does it in the simplest possible way
> that *usually* works. It has no satisfiability solver.
>
> "No effort is made to ensure that the dependencies of all packages are
> fulfilled simultaneously. This can le
It crashes because it tries to convert 10**400 to a float and that fails:
>>> 10**400 / 1e200
Traceback (most recent call last):
File "", line 1, in
10**400 / 1e200
OverflowError: int too large to convert to float
But with two ints it succeeds:
>>> 10**400 / 10**200
1e+200
Note that 1e20
That sounds like a lot of extra checks to put on "/" when the error message
is clear and the user could implement their own checks if they are running
into this niche use case and do 10**400 / int(1e200).
Damian (he/him)
On Sat, Feb 19, 2022 at 8:36 AM Stefan Pochmann
wrote:
> It crashes becaus
On Sat, Feb 19, 2022 at 04:14:57PM +0900, Stephen J. Turnbull wrote:
> Steven D'Aprano writes:
>
> > by the time you have finished debugging the script, the reason for
> > creating the venv in the first place is no longer relevent.
>
> Eh? Would you be willing to unpack that reference to 'venv
On Sat, Feb 19, 2022 at 6:31 AM Damian Shaw
wrote:
> That sounds like a lot of extra checks to put on "/"
>
This isn’t about the division — it’s about the literal. The “e” notation
makes a float. And floats have fixed precision.
Python could try to be smart and create an integer for e notation
On Sun, 20 Feb 2022 at 06:50, Christopher Barker wrote:
>
> On Sat, Feb 19, 2022 at 6:31 AM Damian Shaw
> wrote:
>>
>> That sounds like a lot of extra checks to put on "/"
>
>
> This isn’t about the division — it’s about the literal. The “e” notation
> makes a float. And floats have fixed preci
[Stefan Pochmann ]
> It crashes because it tries to convert 10**400 to a float and that fails:
>
> >>> 10**400 / 1e200
> Traceback (most recent call last):
> File "", line 1, in
> 10**400 / 1e200
> OverflowError: int too large to convert to float
>
> But with two ints it succeeds:
>
> >>> 10
Christopher Barker wrote:
> On Sat, Feb 19, 2022 at 6:31 AM Damian Shaw damian.peter.s...@gmail.com
> wrote:
> > That sounds like a lot of extra checks to put on "/"
> > This isn’t about the division — it’s about the literal.
No, it's about the division. Not about the literal. Sorry I was unclear.
Tim Peters wrote:
> int.__truediv__ makes semi-heroic efforts to
> get 10**400 / int(1e200) "right" (well, as right as can be)
Yes, those semi-heroic efforts actually are what inspired my question. A few
days ago I noticed that and was delighted it works.
Use case was the exact calculation of va
On Sat, Feb 19, 2022 at 10:17:58AM +, Paul Moore wrote:
> On Fri, 18 Feb 2022 at 23:53, Steven D'Aprano wrote:
> > When pip resolves dependencies, it does it in the simplest possible way
> > that *usually* works. It has no satisfiability solver.
[...]
> This is no longer true - pip incorpora
[Tim]
>> int.__truediv__ makes semi-heroic efforts to
>> get 10**400 / int(1e200) "right" (well, as right as can be)
[Stefan Pochmann ]
> Yes, those semi-heroic efforts actually are what inspired my
> question. A few days ago I noticed that and was delighted it works.
>
> Use case was the exact ca
Democracy has its pros and cons. ...RM
On Fri, Feb 18, 2022 at 10:57 AM Samuel Muldoon
wrote:
> *The python-ideas mailing list is a very cumbersome way to vet changes to
> the Python interpreter or other aspects of the python language. If the
> power-that-be would work with GetSatisfaction peop
On Sat, Feb 19, 2022 at 06:04:28AM +1100, Chris Angelico wrote:
> Popularity is a *terrible* way to judge ideas. I'm currently fighting
> with another platform on that same topic.
Can we ask which platform?
> All you can see from a system like that is how many of the popular
> ideas get implemen
On Saturday, February 19, 2022, Stefan Pochmann
wrote:
> >>> 1e200.is_integer()
> True
>
> So that could losslessly be converted to int, and then the division would
> succeed
If the float argument isn't an integer, you can multiply both sides by a
power of 2 that makes it one (if it's finite, o
14 matches
Mail list logo