Re: [Python-Dev] Overloading comparison operator for lists

2019-05-26 Thread Cameron Simpson
This belongs on python-ideas, not python-dev. I've directed replies to this message there. Comments below. On 26May2019 21:52, Montana Burr wrote: NumPy arrays have this awesome feature, where array == 3 does an element-wise comparison and returns a list. For example: np.array([1,2,3,4,5])==3

[Python-Dev] Overloading comparison operator for lists

2019-05-26 Thread Montana Burr
NumPy arrays have this awesome feature, where array == 3 does an element-wise comparison and returns a list. For example: np.array([1,2,3,4,5])==3 returns [False,False,True,False,False] It would be cool if Python had similar functionality for lists. If that is not possible, perhaps we could co

Re: [Python-Dev] PEP 594 - a proposal for unmaintained modules

2019-05-26 Thread Steven D'Aprano
Thanks Steve for your comments, I appreciate them. As I said I don't know if this is a good idea or not so please read my responses below as part of a friendly debate aimed at reaching consensus, not an argument. (The argument is in Room 12 with Mr. Barnard.) On Fri, May 24, 2019 at 09:54:05AM

Re: [Python-Dev] PEP 594 - a proposal for unmaintained modules

2019-05-26 Thread Steven D'Aprano
On Sun, May 26, 2019 at 04:03:11PM +0300, Ivan Pozdeev via Python-Dev wrote: > On 24.05.2019 9:55, Steven D'Aprano wrote: > >I don't know if this is a good idea or a terrible idea or somewhere in > >between, so I'm throwing it out to see if anyone likes it. [...] > This would greately damage Pytho

Re: [Python-Dev] Accepting PEP 587 (Python Initialization Configuration)

2019-05-26 Thread Terry Reedy
On 5/26/2019 10:02 AM, Thomas Wouters wrote: As PEP-delegate, I'm accepting version 5 of PEP 587 (Python Initialization Configuration). ... Thanks, Victor, for pushing this massive amount of work through; And thanks to you for reviewing and approving. it won't affect most people using Py

Re: [Python-Dev] PEP 594: update 1

2019-05-26 Thread Brett Cannon
On Sat, May 25, 2019 at 8:00 PM Daniel Moisset wrote: > Hi, thanks for the work on this proposal, I think this is at least a tip > of the iceberg and a good start for the bigger question of how the stdlib > should evolve.. > > I think that the PEP should include an idea of what should happen if >

Re: [Python-Dev] Have a big machine and spare time? Here's a possible Python bug.

2019-05-26 Thread Tim Peters
[Larry Hastings ] > I have a computer with two Xeon CPUs and 256GB of RAM. So, even > though it's NUMA, I still have 128GB of memory per CPU. It's running a > "spin" of Ubuntu 18.10. > > I compiled a fresh Python 3.7.3 --with-optimizations. I copied the sample > program straight off the StackOve

[Python-Dev] Getting #6641 merged

2019-05-26 Thread Mark Shannon
Hi, I'd like to get https://github.com/python/cpython/pull/6641 merged. I keep having to rebase it and regenerate all the importlib header files, which is becoming a bit annoying. So, I can I ask that if you are going to modify Python/ceval.c can you hold on just a little while, until #6641 is

[Python-Dev] Accepting PEP 587 (Python Initialization Configuration)

2019-05-26 Thread Thomas Wouters
As PEP-delegate, I'm accepting version 5 of PEP 587 (Python Initialization Configuration). I don't think Victor has posted the latest version, but it contains a couple of minor renames, and a new private API to allow us to experiment with two-phase initialisation of Python. There's still time to d

Re: [Python-Dev] PEP 594 - a proposal for unmaintained modules

2019-05-26 Thread Ivan Pozdeev via Python-Dev
On 24.05.2019 9:55, Steven D'Aprano wrote: I don't know if this is a good idea or a terrible idea or somewhere in between, so I'm throwing it out to see if anyone likes it. Let's add a third option to PEP 594 between "keep" and "remove": explicitly flagging a module as unmaintained. Unmaintained

Re: [Python-Dev] PEP 558: Defined semantics for locals()

2019-05-26 Thread Steven D'Aprano
On Sun, May 26, 2019 at 09:20:53PM +1000, Chris Angelico wrote: > Sure, but this PEP is all about defining things that weren't > previously defined, so I wanted to clarify intent rather than current > behaviour. As I understand it, the intent is to: - fix some annoyances/bugs involved when you h

Re: [Python-Dev] PEP 558: Defined semantics for locals()

2019-05-26 Thread Paul Moore
On Sun, 26 May 2019 at 12:23, Chris Angelico wrote: > > On Sun, May 26, 2019 at 8:07 PM Steven D'Aprano wrote: > > On Sun, May 26, 2019 at 08:44:33AM +1000, Chris Angelico wrote: > > > > > From my reading of the description, you could also "assert a is b" - > > > is that correct? > > > > Yes, tha

Re: [Python-Dev] PEP 558: Defined semantics for locals()

2019-05-26 Thread Chris Angelico
On Sun, May 26, 2019 at 8:07 PM Steven D'Aprano wrote: > On Sun, May 26, 2019 at 08:44:33AM +1000, Chris Angelico wrote: > > > From my reading of the description, you could also "assert a is b" - > > is that correct? > > Yes, that's already the behaviour. > > py> def demo(): > ... a = locals()

Re: [Python-Dev] PEP 558: Defined semantics for locals()

2019-05-26 Thread Steven D'Aprano
On Sun, May 26, 2019 at 08:04:11PM +1000, Steven D'Aprano wrote: > Richard, your email seems to have introduced a spurious "SPAM" label [...] > edit the subject line to remove the > label? Thanks. I've done so for this response Oops. Done now. -- Steven __

Re: [Python-Dev] [SPAM?] Re: PEP 558: Defined semantics for locals()

2019-05-26 Thread Steven D'Aprano
Richard, your email seems to have introduced a spurious "SPAM" label to this thread, which may confuse some email clients into treating it as spam. Can you teach your email program that this mailing list is ham, not spam, or failing that, at least edit the subject line to remove the label? Thanks.

Re: [Python-Dev] PEP 558: Defined semantics for locals()

2019-05-26 Thread Steven D'Aprano
(And this time I will remember to remove the SPAM label...) On Sun, May 26, 2019 at 08:44:33AM +1000, Chris Angelico wrote: > From my reading of the description, you could also "assert a is b" - > is that correct? Yes, that's already the behaviour. py> def demo(): ... a = locals() ... b

Re: [Python-Dev] PEP 594 - a proposal for unmaintained modules

2019-05-26 Thread Antoine Pitrou
On Fri, 24 May 2019 09:54:05 -0700 Steve Dower wrote: > > All in all, this is basically where we are today, with the exception > that we haven't officially said that we no longer support these modules. > PEP 594 is this official statement, and our usual process for things we > don't support is

Re: [Python-Dev] Have a big machine and spare time? Here's a possible Python bug.

2019-05-26 Thread Larry Hastings
On 5/22/19 12:15 PM, Tim Peters wrote: There's a Stackoverflow report[1] I suspect is worth looking into, but it requires far more RAM (over 80GB) than I have). [...] But, for a start, it would be good to know if anyone else can actually reproduce the problem. [1] https://stackoverflow.com/ques

Re: [Python-Dev] Have a big machine and spare time? Here's a possible Python bug.

2019-05-26 Thread Antoine Pitrou
On Fri, 24 May 2019 14:23:21 +0200 Thomas Wouters wrote: > On Thu, May 23, 2019 at 5:15 PM Steve Dower wrote: > > > On 23May2019 0542, Inada Naoki wrote: > > > 1. perf shows 95% of CPU time is eaten by _PyObject_Free, not kernel > > space. > > > 2. This loop is cleary hot: > > > > > http