[Python-Dev] Should standard library modules optimize for CPython?

2014-06-01 Thread Steven D'Aprano
I think I know the answer to this, but I'm going to ask it anyway... I know that there is a general policy of trying to write code in the standard library that does not disadvantage other implementations. How far does that go the other way? Should the standard library accept slower code because

Re: [Python-Dev] Should standard library modules optimize for CPython?

2014-06-01 Thread Stefan Behnel
Steven D'Aprano, 01.06.2014 10:11: > Briefly, I have a choice of algorithm for the median function in the > statistics module. If I target CPython, I will use a naive but simple > O(N log N) implementation based on sorting the list and returning the > middle item. (That's what the module current

Re: [Python-Dev] Should standard library modules optimize for CPython?

2014-06-01 Thread Nick Coghlan
On 1 Jun 2014 18:13, "Steven D'Aprano" wrote: > > My feeling is that the CPython standard library should be written for > CPython, that is, it should stick to the current naive implementation of > median, and if PyPy wants to speed the function up, they can provide > their own version of the modul

Re: [Python-Dev] Should standard library modules optimize for CPython?

2014-06-01 Thread Antoine Pitrou
Le 01/06/2014 10:11, Steven D'Aprano a écrit : My feeling is that the CPython standard library should be written for CPython, that is, it should stick to the current naive implementation of median, and if PyPy wants to speed the function up, they can provide their own version of the module. I sh

[Python-Dev] [RELEASE] Python 2.7.7

2014-06-01 Thread Benjamin Peterson
I'm happy to announce the immediate availability of Python 2.7.7. Python 2.7.7 is a regularly scheduled bugfix release for the Python 2.7 series. This release includes months of accumulated bugfixes. All the changes in Python 2.7.7 are described in detail in the Misc/NEWS file of the source tarball

Re: [Python-Dev] Updating turtle.py

2014-06-01 Thread Raymond Hettinger
On May 30, 2014, at 8:32 PM, Terry Reedy wrote: > B. Lets assuming that turtle.py is, at least to some degree, fair game for > fixes and enhancements. PSF Python PyLadies (Jessica Keller, Lynn Root) are > participating in the 2014 GNOME Outreach Program for Women (OPW) > https://wiki.python.o

Re: [Python-Dev] Should standard library modules optimize for CPython?

2014-06-01 Thread Raymond Hettinger
On Jun 1, 2014, at 9:17 AM, Antoine Pitrou wrote: > Le 01/06/2014 10:11, Steven D'Aprano a écrit : >> >> My feeling is that the CPython standard library should be written for >> CPython, that is, it should stick to the current naive implementation of >> median, and if PyPy wants to speed the fu

Re: [Python-Dev] Updating turtle.py

2014-06-01 Thread Stephen J. Turnbull
Raymond Hettinger writes: > One thing I would not like to see happen is telling interns that > their time is being well spent by pep-8 checking code in the > standard library. It sends that wrong message about what > constitutes an actual contribution to the core. There are plenty > of usef