Re: [Python-ideas] PEP: Dict addition and subtraction

2019-03-07 Thread Stephen J. Turnbull
Ka-Ping Yee writes: > On Wed, Mar 6, 2019 at 4:01 PM Chris Angelico wrote: > > But adding dictionaries is fundamentally *useful*. It is expressive. > > It is useful. It's just that + is the wrong name. First, let me say that I prefer ?!'s position here, so my bias is made apparent. I'm

Re: [Python-ideas] PEP: Dict addition and subtraction

2019-03-07 Thread Stephen J. Turnbull
Ka-Ping Yee writes: > On Wed, Mar 6, 2019 at 4:01 PM Chris Angelico wrote: > > But adding dictionaries is fundamentally *useful*. It is expressive. > > It is useful. It's just that + is the wrong name. First, let me say that I prefer ?!'s position here, so my bias is made apparent. I'm

Re: [Python-ideas] PEP: Dict addition and subtraction

2019-03-07 Thread James Lu
Now, this belongs as a separate PEP, and I probably will write one, but I propose: d1 << d2 makes a copy of d1 and merges d2 into it, and when the keys conflict, d2 takes priority. (Works like copy/update.) d1 + d2 makes a new dictionary, taking keys from d1 and d2. If d1 and d2 have a

Re: [Python-ideas] Make Python 2.7’s online docs optionally redirect to Python 3 online docs

2019-03-07 Thread Chris Angelico
On Fri, Mar 8, 2019 at 10:48 AM Steven D'Aprano wrote: > > /2/ followed by /3.1.5/. No /3/ on first page, so no option to > > influence better placement of /3/. > > You could click through to the second page of search results :-) Obligatory XKCD: https://xkcd.com/1334/ It's unclear whether

Re: [Python-ideas] Make Python 2.7’s online docs optionally redirect to Python 3 online docs

2019-03-07 Thread Steven D'Aprano
On Thu, Mar 07, 2019 at 05:53:58PM -0500, Terry Reedy wrote: > On 3/7/2019 8:56 AM, Steven D'Aprano wrote: [...] > >I've found that the search engines are getting better at linking to the > >more recent docs. For example, all of these: > >give me Python 3 first and Python 2 second. [...] > I

Re: [Python-ideas] Make Python 2.7’s online docs optionally redirect to Python 3 online docs

2019-03-07 Thread Greg Ewing
Steven D'Aprano wrote: I've found that the search engines are getting better at linking to the more recent docs. Likely this is simply due to the fact that Python 3 is being used more than it was, so more of its doc pages are getting linked to. If that's true, then thing should continue to

Re: [Python-ideas] Make Python 2.7’s online docs optionally redirect to Python 3 online docs

2019-03-07 Thread Terry Reedy
On 3/7/2019 8:56 AM, Steven D'Aprano wrote: On Thu, Mar 07, 2019 at 08:10:20AM -0500, James Lu wrote: Rationale: When I use a search engine to google a Python question, I frequently get a link to a page of the Python 2.7 documentation that shows before the Python 3 documentation link. This is

Re: [Python-ideas] Make Python 2.7’s online docs optionally redirect to Python 3 online docs

2019-03-07 Thread Adrien Ricocotam
The way search engines works is “the more it’s clicked, the higher it is” In order to have python3 on top of the results, just hit the Python3 result :) ___ Python-ideas mailing list Python-ideas@python.org

Re: [Python-ideas] PEP: Dict addition and subtraction

2019-03-07 Thread Ka-Ping Yee
On Wed, Mar 6, 2019 at 4:01 PM Chris Angelico wrote: > On Thu, Mar 7, 2019 at 10:52 AM Josh Rosenberg > wrote: > > > > Allowing dicts to get involved in + means: > > Lots of words that basically say: Stuff wouldn't be perfectly pure. > > But adding dictionaries is fundamentally *useful*. It is

Re: [Python-ideas] Make Python 2.7’s online docs optionally redirect to Python 3 online docs

2019-03-07 Thread Steven D'Aprano
On Thu, Mar 07, 2019 at 08:10:20AM -0500, James Lu wrote: > Rationale: When I use a search engine to google a Python question, I > frequently get a link to a page of the Python 2.7 documentation that > shows before the Python 3 documentation link. > > This is annoying and slows down my

Re: [Python-ideas] Make Python 2.7’s online docs optionally redirect to Python 3 online docs

2019-03-07 Thread Andre Roberge
On Thu, Mar 7, 2019 at 9:10 AM James Lu wrote: > Rationale: When I use a search engine to google a Python question, I > frequently get a link to a page of the Python 2.7 documentation that shows > before the Python 3 documentation link. > There exists browser extensions that do this:

[Python-ideas] Make Python 2.7’s online docs optionally redirect to Python 3 online docs

2019-03-07 Thread James Lu
Rationale: When I use a search engine to google a Python question, I frequently get a link to a page of the Python 2.7 documentation that shows before the Python 3 documentation link. This is annoying and slows down my programming. I propose: That we add a setting to Python’s online