On Sun, Mar 15, 2020 at 9:41 PM Andrew Barnert via Python-ideas
wrote:
> Do you really want to require “binary”?
I don't think so; they never talked about binary trees, only "binary
search tree semantics." It could alternately be called autobalanced
tree semantics or something.
>Sorted Container
On Mar 15, 2020, at 22:37, Stephen J. Turnbull
wrote:
>
>
> Because they're not always available, even in 2020. Also, ∞ is
> ambiguous; it's used for the ordinal number infinity (IIRC, more
> precisely denoted ω), the cardinal number infinity, the positive limit
> of the real line, the antipod
> On Mar 16, 2020, at 00:13, Ben Rudiak-Gould wrote:
>
> On Sun, Mar 15, 2020 at 9:41 PM Andrew Barnert via Python-ideas
> wrote:
>> Do you really want to require “binary”?
>
> I don't think so; they never talked about binary trees, only "binary
> search tree semantics." It could alternately b
On Mon, Mar 16, 2020 at 02:36:25PM +0900, Stephen J. Turnbull wrote:
> Kyle Stanley writes:
>
> > The behavior is the same on Python 3.8.2:
> >
> > Python 3.8.2 (default, Feb 26 2020, 22:21:03)
> > [GCC 9.2.1 20200130] on linux
> > Type "help", "copyright", "credits" or "license" for more in
Andrew Barnert writes:
> Well, there are an infinite number of ever larger infinite
> ordinals, ω or ω_0 being the first one, and likewise an infinite
> number of infinite cardinal, aleph_0 being the first one, and
> people rarely use the ∞ symbol for any of them.
s/people/mathematicians/ and
On Sun, Mar 15, 2020 at 11:37:53PM -0400, Wes Turner wrote:
> Monkeypatching the __str__ or __repr__ of a builtin is generally
> undesirable because that's global and not thread safe.
Monkeypatching the __str__ or __repr__ of a builtin is generally
impossible.
py> int.__repr__ = lambda self: 'n
On Mon, Mar 16, 2020 at 01:25:13AM -0400, Wes Turner wrote:
[Greg]
> > Also, strs and reprs of arbitrary objects often end up in places
> > such as log files which aren't equipped to handle unicode or other
> > fancy things. So keeping them as basic as possible is a good idea.
> >
>
> Is this why
On Mon, Mar 16, 2020, 3:41 AM Andrew Barnert via Python-ideas <
[email protected]> wrote:
> On Mar 15, 2020, at 22:37, Stephen J. Turnbull <
> [email protected]> wrote:
> >
> >
> > Because they're not always available, even in 2020. Also, ∞ is
> > ambiguous; it's used for
On Mon, Mar 16, 2020 at 12:57 AM Andrew Barnert wrote:
> Even if the extra indirection overhead turns out not to be an issue, just
> from the added complexity (to every possible implementation) it seems like it
> would be a bad idea to make that a requirement.
The only change needed to support
>
> On Mon, Mar 16, 2020, 1:04 AM Greg Ewing
> wrote:
>
>>
>> Also, strs and reprs of arbitrary objects often end up in places
>> such as log files which aren't equipped to handle unicode or other
>> fancy things. So keeping them as basic as possible is a good idea.
>>
>
> Is this why __unicode__
On Mon, 16 Mar 2020 at 04:51, Kyle Stanley wrote:
> PEP 8 itself is very far from a definitive authority. Its scope is
> specifically intended to cover CPython stdlib development, not all uses of
> Python.
Yes, I know. But it's a common convention, and Python relies often on
conventions. For ex
Note that the OP used the word "semantics", but primarily meant
"performance characteristics":
* We can insert elements into the structure in time faster than O(n), i.e.
> O(logn) for std::map
> * We can iterate over all of the elements of the structure in sorted order
> in linear time, i.e. O(n)
Based on the conversations stemming from my previous post, it is clear that the
topic was too implementation-specific. It is not clear whether dunder methods
are an appropriate component of the solution (they might or might not be).
Also, it presumably makes sense to start by looking at prior ar
This has turned into a rant about numpy and the scipy ecosystem -- not
relevant at all to python-ideas.
Please stop.
-CHB
On Mon, Mar 16, 2020 at 9:51 AM Marco Sulla
wrote:
> On Mon, 16 Mar 2020 at 04:51, Kyle Stanley wrote:
> > PEP 8 itself is very far from a definitive authority. Its scope
Based on the conversations stemming from my previous post, it is clear that the
topic was too implementation-specific. It is not clear whether dunder methods
are an appropriate component of the solution (they might or might not be).
This suggestion is to try to solve 2 inter-related but differen
Steve Jorgensen wrote:
> Based on the conversations stemming from my previous post, it is clear that
> the topic
> was too implementation-specific. It is not clear whether dunder methods are
> an appropriate
> component of the solution (they might or might not be).
> Also, it presumably makes sen
Oops. Somehow this subject was posted twice. Please ignore this thread & follow
the other thread with the same subject line.
___
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://ma
On Mar 16, 2020, at 02:54, Stephen J. Turnbull
wrote:
>
> Andrew Barnert writes:
>
>> Well, there are an infinite number of ever larger infinite
>> ordinals, ω or ω_0 being the first one, and likewise an infinite
>> number of infinite cardinal, aleph_0 being the first one, and
>> people rarely
On Mar 16, 2020, at 10:39, Barry wrote:
>
>
>>> On 16 Mar 2020, at 14:43, Ben Rudiak-Gould wrote:
>>>
>>> On Mon, Mar 16, 2020 at 12:57 AM Andrew Barnert wrote:
>>> Even if the extra indirection overhead turns out not to be an issue, just
>>> from the added complexity (to every possible imp
> On 16 Mar 2020, at 14:43, Ben Rudiak-Gould wrote:
>
> On Mon, Mar 16, 2020 at 12:57 AM Andrew Barnert wrote:
>> Even if the extra indirection overhead turns out not to be an issue, just
>> from the added complexity (to every possible implementation) it seems like
>> it would be a bad idea
On Mar 16, 2020, at 09:53, Christopher Barker wrote:
>
>
> Note that the OP used the word "semantics", but primarily meant "performance
> characteristics":
IIRC, the C++ specification includes guaranteed performance characteristics as
part of its library semantics, so an implementation whose
On Mon, Mar 16, 2020 at 11:36 AM Andrew Barnert wrote:
> > Note that the OP used the word "semantics", but primarily meant
> "performance characteristics":
>
> IIRC, the C++ specification includes guaranteed performance
> characteristics as part of its library semantics,
Now we are getting into
I would love a formalized, for example, __pretty__ hook. Many of our
classes have __pretty__ and __json__ "custom" dunders defined and our
PrettyPrinters / JSONEncoders have checks for them (though the __pretty__
API has proven difficult to stabilize).
w/r/t to repurposing __str__, I (personally)
On Mar 16, 2020, at 11:52, Christopher Barker wrote:
>
>> On Mon, Mar 16, 2020 at 11:36 AM Andrew Barnert wrote:
>
>
> Anyway, my only point was that we DO want to consider both performance and
> semantics here -- a Sorted Dict (or SortedList, or ...) has different use
> cases, and thus shou
> On 16 Mar 2020, at 20:59, James Edwards wrote:
>
> I would love a formalized, for example, __pretty__ hook. Many of our classes
> have __pretty__ and __json__ "custom" dunders defined and our PrettyPrinters
> / JSONEncoders have checks for them (though the __pretty__ API has proven
> diff
On Mon, Mar 16, 2020, 5:57 AM Stephen J. Turnbull <
[email protected]> wrote:
> s/people/mathematicians/ and I'd agree with you. But I did write "people".
>
Are mathematicians not people? :-)
If they are, them "some mathematicians" implies "some people."
__
This makes on my count 6 messages on arcane mathematical topics that
have nothing to do with the original proposition, which was to do with
prettyprinting.
Don't get me wrong - I enjoy such discussions as much as anyone,
considering myself a mathematician of sorts. But it must be frustrating
On Mon, Mar 16, 2020 at 2:22 PM Andrew Barnert wrote:
>
> Yes, everyone who designs a sorted container library runs into the fact
> that a SortedList is a Sequence, and mutable, but not even close to a
> MutableSequence—it’s not just append and extend; you can’t even do
> __setitem__. In fact, it
(no reason to moderate a topic that wanders off what you think is the linear
path, Rob… no one is violating CoC and that’s mostly what I care about)
> On Mar 16, 2020, at 6:11 PM, Rob Cliffe via Python-ideas
> wrote:
>
> This makes on my count 6 messages on arcane mathematical topics that have
Taking Rob Cliffe's statement in good part, changing the subject
(belatedly, sorry!)
Andrew Barnert writes:
> What does FVO mean?
Sorry. "For values of"
> At any rate, there’s nothing wrong with simplistic.
My usage of simplistic is to simple as complicated is to complex. The
distinction r
David Mertz writes:
> On Mon, Mar 16, 2020, 5:57 AM Stephen J. Turnbull <
> [email protected]> wrote:
>
> > s/people/mathematicians/ and I'd agree with you. But I did write "people".
> >
>
> Are mathematicians not people? :-)
As a mathematician who is a people (I am lar
31 matches
Mail list logo