[Python-ideas] Re: Instance method to test equivalence between set and iterable

2020-03-23 Thread Steven D'Aprano
On Mon, Mar 23, 2020 at 06:03:06PM -0700, Andrew Barnert wrote: > The existing methods are named issubset and issuperset (and > isdisjoint, which doesn’t have an operator near-equivalent). Given > that, would you still want equals instead of isequal or something? Oops! I mean, aha, you passed

[Python-ideas] Re: New explicit methods to trim strings

2020-03-23 Thread Richard Damon
On 3/23/20 3:31 PM, Andrew Barnert via Python-ideas wrote: > On Mar 23, 2020, at 04:51, Chris Angelico wrote: >> Right, which is why for a proposal like this, it's best to start with >> the simple and straight-forward option of case sensitivity and precise >> matching. Removing a prefix of

[Python-ideas] Re: About python3 on windows

2020-03-23 Thread Oleg Broytman
On Tue, Mar 24, 2020 at 11:30:38AM +1100, Steven D'Aprano wrote: > On Tue, Mar 24, 2020 at 12:45:42AM +0100, Oleg Broytman wrote: > > > > Won't that create a virtual environment using Python3 on Windows and > > > using Python2 most other places, which is exactly the problem Fred is > > >

[Python-ideas] Re: Instance method to test equivalence between set and iterable

2020-03-23 Thread Andrew Barnert via Python-ideas
> On Mar 23, 2020, at 16:57, Steven D'Aprano wrote: > > I shouldn't need to say this, but for the record I am not proposing and > do not want set equality to support lists; nor do I see the need for a > new method to perform "equivalent to equality" tests; but if the > consensus is that sets

[Python-ideas] Re: New explicit methods to trim strings

2020-03-23 Thread Stephen J. Turnbull
Christopher Barker writes: > This is now a draft PEP, and being (has been?) discussed on python-dev -- > time to go there is you want more input. They don't, and it's a "idea" separate from the PEP. Python is not going to change the semantics of str from array of code points to array of

[Python-ideas] Re: About python3 on windows

2020-03-23 Thread Steven D'Aprano
On Mon, Mar 23, 2020 at 05:59:41PM -, Frédéric De Jaeger wrote: > The issue is: There is no reliable way to launch a python script. > > The command: > > python myscript.py > > launches python3 on windows and python2 on 99% of the unix market. Its probably less than 99% by now, but

[Python-ideas] Re: New explicit methods to trim strings

2020-03-23 Thread Andrew Barnert via Python-ideas
On Mar 23, 2020, at 12:40, Chris Angelico wrote: > > On Tue, Mar 24, 2020 at 6:31 AM Andrew Barnert wrote: >> >>> On Mar 23, 2020, at 04:51, Chris Angelico wrote: >>> >>> Right, which is why for a proposal like this, it's best to start with >>> the simple and straight-forward option of case

[Python-ideas] Re: About python3 on windows

2020-03-23 Thread Steven D'Aprano
On Tue, Mar 24, 2020 at 12:45:42AM +0100, Oleg Broytman wrote: > > Won't that create a virtual environment using Python3 on Windows and > > using Python2 most other places, which is exactly the problem Fred is > > having? > > Depends on how literally one reads ``python -m venv``. I read it as

[Python-ideas] Re: About python3 on windows

2020-03-23 Thread Kyle Stanley
Brett Cannon wrote: > There is an option to install Python to PATH on Windows if you check the appropriate box during installation, but that's not really the > way Windows apps typically work. In this case of the OP, if they're mass installing Python on company Windows devices, they might want to

[Python-ideas] Re: Instance method to test equivalence between set and iterable

2020-03-23 Thread Steven D'Aprano
On Mon, Mar 23, 2020 at 02:05:49PM +, Rob Cliffe via Python-ideas wrote: > >>> s = set("a") > >>> t = list("aa") > >>> s.issubset(t) > True > >>> s.issuperset(t) > True > > but it would be misleading IMO to say that s and t are in some sense > equal. In *some* sense they are equal: -

[Python-ideas] Re: About python3 on windows

2020-03-23 Thread Brett Cannon
On Mon, Mar 23, 2020 at 3:47 PM Mike Miller wrote: > > On 2020-03-23 10:59, Frédéric De Jaeger wrote: > > Hi all, > > > > There is a recurring problem > > Yep, that's a problem. I've built up a habit on Ubuntu where I type > python3 a > number of times a day, honed over several years. So far

[Python-ideas] Re: About python3 on windows

2020-03-23 Thread Oleg Broytman
On Tue, Mar 24, 2020 at 10:22:28AM +1100, Steven D'Aprano wrote: > On Mon, Mar 23, 2020 at 08:09:57PM +0100, Oleg Broytman wrote: > > On Mon, Mar 23, 2020 at 05:59:41PM -, Fr??d??ric De Jaeger > > wrote: > > > The issue is: There is no reliable way to launch a python script. > > > > > >

[Python-ideas] Re: About python3 on windows

2020-03-23 Thread Steven D'Aprano
On Mon, Mar 23, 2020 at 08:09:57PM +0100, Oleg Broytman wrote: > On Mon, Mar 23, 2020 at 05:59:41PM -, Fr??d??ric De Jaeger > wrote: > > The issue is: There is no reliable way to launch a python script. > > > > The command: > > > > python myscript.py > > > > launches python3 on

[Python-ideas] Re: About python3 on windows

2020-03-23 Thread Mike Miller
On 2020-03-23 10:59, Frédéric De Jaeger wrote: Hi all, There is a recurring problem Yep, that's a problem. I've built up a habit on Ubuntu where I type python3 a number of times a day, honed over several years. So far so good. Recently I've had to use a Windows VM for some stuff at

[Python-ideas] Re: Instance method to test equivalence between set and iterable

2020-03-23 Thread Greg Ewing
On 23/03/20 11:10 pm, M.-A. Lemburg wrote: The Python way is the mathematically correct way of interpreting the terms "subset" and "superset". Generally in maths it's usually more convenient if the simplest terminology includes edge cases. For example, the definition of a powerset would be

[Python-ideas] Re: New explicit methods to trim strings

2020-03-23 Thread Christopher Barker
Folks, This is now a draft PEP, and being (has been?) discussed on python-dev -- time to go there is you want more input. https://mail.python.org/archives/list/python-...@python.org/thread/WFEWPAOVXOGY7UDXSKMYLVWBCFSHI3VT/ -CHB On Mon, Mar 23, 2020 at 12:37 PM Chris Angelico wrote: > On

[Python-ideas] Re: New explicit methods to trim strings

2020-03-23 Thread Chris Angelico
On Tue, Mar 24, 2020 at 6:31 AM Andrew Barnert wrote: > > On Mar 23, 2020, at 04:51, Chris Angelico wrote: > > > > Right, which is why for a proposal like this, it's best to start with > > the simple and straight-forward option of case sensitivity and precise > > matching. Removing a prefix of

[Python-ideas] Re: Instance method to test equivalence between set and iterable

2020-03-23 Thread Rob Cliffe via Python-ideas
On 23/03/2020 09:12, Steven D'Aprano wrote: On Sun, Mar 22, 2020 at 08:55:47PM -0700, Andrew Barnert wrote: [...] But I don’t think that’s relevant here. You claimed that 'the "arbitrary iterables" part is a distraction', but I think it’s actually the whole point of the proposal. The initial

[Python-ideas] Re: New explicit methods to trim strings

2020-03-23 Thread Andrew Barnert via Python-ideas
On Mar 23, 2020, at 04:51, Chris Angelico wrote: > > Right, which is why for a proposal like this, it's best to start with > the simple and straight-forward option of case sensitivity and precise > matching. Removing a prefix of "a\u0301" will not remove a leading > "\xe1" and vice versa (just

[Python-ideas] Re: About python3 on windows

2020-03-23 Thread Oleg Broytman
On Mon, Mar 23, 2020 at 05:59:41PM -, Fr??d??ric De Jaeger wrote: > The issue is: There is no reliable way to launch a python script. > > The command: > > python myscript.py > > launches python3 on windows and python2 on 99% of the unix market. Create and activate a virtual

[Python-ideas] Re: About python3 on windows

2020-03-23 Thread Andrew Barnert via Python-ideas
> On Mar 23, 2020, at 11:16, Frédéric De Jaeger wrote: > > The command: > >python myscript.py > > launches python3 on windows and python2 on 99% of the unix market. While that’s true for Mac 10.14, Ubuntu 18.04 LTS, etc., I think almost everyone is deprecating Python 2 in their current

[Python-ideas] Re: About python3 on windows

2020-03-23 Thread Steve Barnes
Hi Fred, If windows users associate .py with the py.exe launcher, (and .pyw with the pyw.exe launcher), then it will default to python 3 (highest version installed, 64 bit if available), and will honour a `#! python3` shebang, (with a number of formats accepted). It should also be reasonably

[Python-ideas] About python3 on windows

2020-03-23 Thread Frédéric De Jaeger
Hi all, There is a recurring problem in my company where we use python in various places (python3). We do cross platform development windows/linux and our python scripts need to run everywhere. Some scripts are launched manually in a terminal. Others are launched via windows' gui interface.

[Python-ideas] Re: Instance method to test equivalence between set and iterable

2020-03-23 Thread Guido van Rossum
< is the strict subset operator. <= is subset. What more can I say? On Mon, Mar 23, 2020 at 02:01 Steven D'Aprano wrote: > On Sun, Mar 22, 2020 at 09:49:26PM -0700, Guido van Rossum wrote: > > On Sun, Mar 22, 2020 at 6:51 PM Steven D'Aprano > wrote: > > > > > We might have a terminology issue

[Python-ideas] Re: Developer messages on install (pip, poetry, etc.)

2020-03-23 Thread Ronie Martinez
Hi Ned, That is a very different issue as the ads are similar to what we see when browsing. These ads are commonly provided by 3rd party ad networks and not directly related to the package maintainer. As for this proposal, think of it as links, messages, or announcements specific to the

[Python-ideas] Re: Developer messages on install (pip, poetry, etc.)

2020-03-23 Thread Ned Batchelder
On 3/23/20 1:01 AM, Ronie Martinez wrote: Good day! I have been developing in Node for a few months now for non-Python projects (legacy project) and I found a NPM feature which could be helpful to developers of Python libraries. When you install a NPM package, some show a message from the

[Python-ideas] Re: Developer messages on install (pip, poetry, etc.)

2020-03-23 Thread Ricky Teachey
The OP might be interested in this related proposal, "pip thank": https://github.com/pypa/pip/issues/5970 --- Ricky. "I've never met a Kentucky man who wasn't either thinking about going home or actually going home." - Happy Chandler On Mon, Mar 23, 2020 at 5:37 AM Steven D'Aprano wrote: >

[Python-ideas] Re: New explicit methods to trim strings

2020-03-23 Thread Chris Angelico
On Mon, Mar 23, 2020 at 10:40 PM Richard Damon wrote: > > On 3/23/20 4:33 AM, Chris Angelico wrote: > > On Mon, Mar 23, 2020 at 7:06 PM Alex Hall wrote: > >> I think I'm missing something, why is case insensitivity a mess? > >> > > Because there are many characters that case fold in strange

[Python-ideas] Re: New explicit methods to trim strings

2020-03-23 Thread Richard Damon
On 3/23/20 4:33 AM, Chris Angelico wrote: > On Mon, Mar 23, 2020 at 7:06 PM Alex Hall wrote: >> I think I'm missing something, why is case insensitivity a mess? >> > Because there are many characters that case fold in strange ways. > "ıIiİ".casefold() == 'ıiii̇' which means that lowercase dotless

[Python-ideas] Re: Instance method to test equivalence between set and iterable

2020-03-23 Thread Chris Angelico
On Mon, Mar 23, 2020 at 8:00 PM Steven D'Aprano wrote: > > On Sun, Mar 22, 2020 at 09:49:26PM -0700, Guido van Rossum wrote: > > On Sun, Mar 22, 2020 at 6:51 PM Steven D'Aprano wrote: > > > > > We might have a terminology issue here, since according to Wikipedia > > > there is some dispute over

[Python-ideas] Re: Instance method to test equivalence between set and iterable

2020-03-23 Thread M.-A. Lemburg
On 3/23/2020 5:49 AM, Guido van Rossum wrote: > On Sun, Mar 22, 2020 at 6:51 PM Steven D'Aprano > wrote: > > We might have a terminology issue here, since according to Wikipedia > there is some dispute over whether or not to include the equality case > in

[Python-ideas] Re: Developer messages on install (pip, poetry, etc.)

2020-03-23 Thread Steven D'Aprano
I think that feature is best discussed in the packaging SIG rather than here. This is for proposed language and standard library features, while this will, I think, be a packaging feature. Unfortunately I don't know where the right place to discuss packaging proposals like this is. Perhaps try

[Python-ideas] Re: Instance method to test equivalence between set and iterable

2020-03-23 Thread Steven D'Aprano
On Sun, Mar 22, 2020 at 08:55:47PM -0700, Andrew Barnert wrote: [...] > But I don’t think that’s relevant here. You claimed that 'the > "arbitrary iterables" part is a distraction', but I think it’s > actually the whole point of the proposal. The initial suggestion is > that there are lots of

[Python-ideas] Re: Instance method to test equivalence between set and iterable

2020-03-23 Thread Steven D'Aprano
On Sun, Mar 22, 2020 at 09:49:26PM -0700, Guido van Rossum wrote: > On Sun, Mar 22, 2020 at 6:51 PM Steven D'Aprano wrote: > > > We might have a terminology issue here, since according to Wikipedia > > there is some dispute over whether or not to include the equality case > > in subset/superset:

[Python-ideas] Re: New explicit methods to trim strings

2020-03-23 Thread Chris Angelico
On Mon, Mar 23, 2020 at 7:06 PM Alex Hall wrote: > > I think I'm missing something, why is case insensitivity a mess? > Because there are many characters that case fold in strange ways. "ıIiİ".casefold() == 'ıiii̇' which means that lowercase dotless ı doesn't casefold to the same thing that

[Python-ideas] Re: New explicit methods to trim strings

2020-03-23 Thread Alex Hall
I think I'm missing something, why is case insensitivity a mess? On Mon, Mar 23, 2020 at 9:32 AM Chris Angelico wrote: > On Mon, Mar 23, 2020 at 5:06 PM Steve Barnes > wrote: > > > > I personally think that there is a better case for an ignore_case flag – > the number of times that I have been

[Python-ideas] Re: New explicit methods to trim strings

2020-03-23 Thread Chris Angelico
On Mon, Mar 23, 2020 at 5:06 PM Steve Barnes wrote: > > I personally think that there is a better case for an ignore_case flag – the > number of times that I have been caught out with [‘a.doc’, ‘b.Doc’, ‘c.DOC’] > especially on MS platforms. > Case insensitivity is a mess. I think it'd be a

[Python-ideas] Re: New explicit methods to trim strings

2020-03-23 Thread Steve Barnes
I personally think that there is a better case for an ignore_case flag – the number of times that I have been caught out with [‘a.doc’, ‘b.Doc’, ‘c.DOC’] especially on MS platforms. Steve Barnes From: Kyle Stanley Sent: 23 March 2020 05:49 To: Stephen J. Turnbull Cc: python-ideas Subject: