Thanks so much Ben for documenting all these examples. I've been frustrated
by the inconsistencies, but hasn't realized all of those you note.
It would be a breaking change, but I'd really vastly prefer if almost all
of those OverflowErrors and others were simply infinities. That's much
closer to
On Fri, 11 Sep 2020 at 19:50, David Mertz wrote:
> I like the idea of having these functions, but I don't like overloading
> the argument to a function with "filename or file-like object" as is common
> in libraries like Pandas. I think there are a few places the standard
> library does it, but
On Mon, Sep 14, 2020 at 9:36 AM Stephen J. Turnbull <
turnbull.stephen...@u.tsukuba.ac.jp> wrote:
> Christopher Barker writes:
> > IEEE 754 is a very practical standard -- it was well designed, and is
> > widely used and successful. It is not perfect, and in certain use
> cases, it
> > may not
Little errata: change
Cython, for example, uses its parser to compile Python code
to
Cython, for example, uses its parser to compile Cython code
___
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...
On Sun, 23 Aug 2020 at 02:42, Guido van Rossum wrote:
> IMO this is just too large of a step to expect either redradrist or Marco
> Sulla to take.
You're quite right, I have proposed it to have an opinion by experts.
Indeed I have no knowledge about how a parser works. This is why I
asked if thi
14.09.20 19:55, Chris Angelico пише:
> I think not; unless there are API details to be hashed out or
> counterarguments to be rebuffed, I think this is fairly simple and
> non-controversial.
I also considered this issue simple and non-controversial. But the
discussion turned in an unexpected direc
I just had an idea: we have mp->ma_used and keys->dk_nentries.
holes = mp->ma_keys->dk_nentries - mp->ma_used
is the number of holes in the dict.
So, if holes == 0, you have O(1). But, if the dict has holes, you
can't have O(1), but you can speedup the check of the entry by
counting the NULLs in
Well, I didn't read the entire discussion... but I wrote in
unsuspicious times a stupid little module, msutils, with two stupid
little functions, jsonLoad and jsonDump:
https://github.com/Marco-Sulla/msutils/blob/master/msutils/jsonutil.py#L20
___
Python
@Inada (senpai?):
In the meanwhile I tried to apply some tricks to speedup the dict
creation without success.
This is my effort:
https://github.com/Marco-Sulla/cpython/blob/master/Objects/dictobject.c
As you can see, I simply "cloned" some functions that create dict, and
removed some checks that
On Mon, Sep 14, 2020 at 9:58 AM Chris Angelico wrote:
> On Tue, Sep 15, 2020 at 2:41 AM Christopher Barker
> wrote:
> >
> > There seems to be a fair bit of support for this idea.
> >
> > Will it need a PEP ?
>
> I think not; unless there are API details to be hashed out or
> counterarguments to
On Mon, Sep 14, 2020 at 10:00 AM Chris Angelico wrote:
> On Tue, Sep 15, 2020 at 2:41 AM Christopher Barker
> wrote:
> >
> > There seems to be a fair bit of support for this idea.
> >
> > Will it need a PEP ?
>
> I think not; unless there are API details to be hashed out or
> counterarguments
On Tue, Sep 15, 2020 at 3:45 AM Richard Damon wrote:
>
> On 9/14/20 12:34 PM, Stephen J. Turnbull wrote:
> > That's fine, but Python doesn't give you that. In floats, 0.0 is not
> > true 0, it's the set of all underflow results plus true 0. So by your
> > argument, in float arithmetic, we should
On 9/14/20 12:34 PM, Stephen J. Turnbull wrote:
> That's fine, but Python doesn't give you that. In floats, 0.0 is not
> true 0, it's the set of all underflow results plus true 0. So by your
> argument, in float arithmetic, we should not have ZeroDivisionErrors.
> But we do raise them.
Actually,
On Tue, Sep 15, 2020 at 2:41 AM Christopher Barker wrote:
>
> There seems to be a fair bit of support for this idea.
>
> Will it need a PEP ?
>
I think not; unless there are API details to be hashed out or
counterarguments to be rebuffed, I think this is fairly simple and
non-controversial.
(If
There seems to be a fair bit of support for this idea.
Will it need a PEP ?
-CHB
On Mon, Sep 14, 2020 at 9:20 AM Stephen J. Turnbull <
turnbull.stephen...@u.tsukuba.ac.jp> wrote:
> Christopher Barker writes:
>
> > On Sun, Sep 13, 2020 at 7:58 AM Stephen J. Turnbull <
>
> > turnbull.stephen...
Christopher Barker writes:
> On Sun, Sep 13, 2020 at 8:10 AM Stephen J. Turnbull <
> turnbull.stephen...@u.tsukuba.ac.jp> wrote:
>
> > As Steven points out, it's an overflow, and IEEE *but not Python* is
> > clear about that. In fact, none of the actual infinities I've tried
> > (1.0 / 0.0
Christopher Barker writes:
> On Sun, Sep 13, 2020 at 7:58 AM Stephen J. Turnbull <
> turnbull.stephen...@u.tsukuba.ac.jp> wrote:
>
> > > encoding=None: this is the important one -- json is always UTF-8 yes?
> >
> > Standard JSON is always UTF-8. Nevertheless, I'm quite sure that
> > there
To me it seems like a useful shortcut that means:
>>> x == True and type(x) == bool
But, as you say, it is best to just let the Python interpreter treat it as
a boolean (i.e. within an `if`, it is converted automatically)
Now, I am thinking it would actually be *bad* to have the CPython
impleme
18 matches
Mail list logo