Re: [Python-Dev] for...else

2017-07-24 Thread Nick Coghlan
On 25 July 2017 at 02:23, Ben Hoyt wrote: > This is more of a python-ideas discussion, and Steven's answer is good. > > I'll just add one thing. Maybe it's obvious to others, but I've liked > for...else since I found a kind of mnemonic to help me remember when the > "else" part

Re: [Python-Dev] Appending a link back to bugs.python.org in GitHub PRs

2017-07-24 Thread Mariatta Wijaya
Thanks for working on this, Kushal and Brett. Works great! Mariatta Wijaya On Fri, Jul 21, 2017 at 2:28 PM, Brett Cannon wrote: > Thanks to Kushal Das we now have one of the most requested features since > the transition: a link in PRs back to bugs.python.org (in a more >

Re: [Python-Dev] Program runs in 12s on Python 2.7, but 5s on Python 3.5 -- why so much difference?

2017-07-24 Thread Gregory P. Smith
On Mon, Jul 24, 2017 at 1:49 PM Wang, Peter Xihong < peter.xihong.w...@intel.com> wrote: > I believe we have evaluated clang vs gcc before (long time ago), and gcc > won at that time. > > > > PGO might have overshadowed impact from computed goto, and thus the latter > may no longer be needed. >

Re: [Python-Dev] Program runs in 12s on Python 2.7, but 5s on Python 3.5 -- why so much difference?

2017-07-24 Thread Wang, Peter Xihong
I believe we have evaluated clang vs gcc before (long time ago), and gcc won at that time. PGO might have overshadowed impact from computed goto, and thus the latter may no longer be needed. When the performance difference is as large as 50%, there could be various options to nail down the

Re: [Python-Dev] Program runs in 12s on Python 2.7, but 5s on Python 3.5 -- why so much difference?

2017-07-24 Thread Ben Hoyt
Thanks for testing. Oddly, I just tested it in Linux (Ubuntu), and get the same results as you -- Python 2.7.13 outperforms 3 (3.5.3 in my case) by a few percent. And even under a Virtualbox VM it takes 3.4 and 3.6 seconds, compared to ~5s on the host macOS operating system. Very odd. I guess

Re: [Python-Dev] for...else

2017-07-24 Thread Isaac Morland
The way I remember it is to observe that the following are *almost* exactly the same thing: if C: T else: E while C: T else: E The *only* differences are: 1) where execution jumps if it reaches the end of the T: in the "while", it jumps back to the while itself, resulting in

Re: [Python-Dev] Is Windows XP still supported on Python 2.7?

2017-07-24 Thread Victor Stinner
2017-07-24 19:05 GMT+02:00 Zachary Ware : > In this case, considering that it's a test of a > 2.x-only module on an out-of-vendor-support OS, skipping the tests > (possibly even the entirety of test_bsddb3) on XP sounds just fine to > me. Oh ok. Since Terry and you

Re: [Python-Dev] Is Windows XP still supported on Python 2.7?

2017-07-24 Thread Terry Reedy
On 7/24/2017 5:04 AM, Victor Stinner wrote: We have a Windows XP buildbot for Python 2.7, run by David Bolen: http://buildbot.python.org/all/builders/x86%20Windows%20XP%202.7/ test_bsddb3 fails randomly on this buildbot: http://bugs.python.org/issue30778 If that turns out to be an unfixable

Re: [Python-Dev] for...else

2017-07-24 Thread Alexander Belopolsky
On Mon, Jul 24, 2017 at 12:23 PM, Ben Hoyt wrote: > .. I found a kind of mnemonic to help me remember when the > "else" part happens: I think of it not as "for ... else" but as "break ... > else" -- saying it this way makes it clear to me that the break goes with > the else.

Re: [Python-Dev] for...else

2017-07-24 Thread Ben Hoyt
This is more of a python-ideas discussion, and Steven's answer is good. I'll just add one thing. Maybe it's obvious to others, but I've liked for...else since I found a kind of mnemonic to help me remember when the "else" part happens: I think of it not as "for ... else" but as "break ... else"

Re: [Python-Dev] for...else

2017-07-24 Thread Steven D'Aprano
Hello Kiuhnm, and welcome. On Mon, Jul 24, 2017 at 05:35:03PM +0200, Kiuhnm via Python-Dev wrote: > Hello, > > I think that the expression "for...else" or "while...else" is completely > counter-intuitive. You may be right -- this has been discussed many, many times before. In my personal

[Python-Dev] for...else

2017-07-24 Thread Kiuhnm via Python-Dev
Hello, I think that the expression "for...else" or "while...else" is completely counter-intuitive. Wouldn't it be possible to make it clearer? Maybe something like break in for i in range(n): ... if cond: break else: ... I'm not an English native speaker so

Re: [Python-Dev] dictionaries in Dataframe column

2017-07-24 Thread Oleg Broytman
Hello. This mailing list is to work on developing Python (adding new features to Python itself and fixing bugs); if you're having problems learning, understanding or using Python, please find another forum. Probably python-list/comp.lang.python mailing list/news group is the best place; there

[Python-Dev] dictionaries in Dataframe column

2017-07-24 Thread Katherine Bobrovnik
Hello guys! I've stuck at this: I have pandas Dataframe with a lot of columns. One column contains dictionaries with emoji like {'count': 1, 'name': 'fire'}. My goal is to sort rows of this Dataframe by the number from 'count'. Like first row will be with {'count': 49, 'name': '+1'}, the last -

Re: [Python-Dev] Cython compiled stdlib modules - Re: Python startup time

2017-07-24 Thread Nick Coghlan
On 22 July 2017 at 06:43, Stefan Behnel wrote: > Nick Coghlan schrieb am 21.07.2017 um 08:23: >> I'll also note that in these cases where the import overhead is >> proportionally significant for always-imported modules, we may want to look >> at the benefits of freezing them

Re: [Python-Dev] Is Windows XP still supported on Python 2.7?

2017-07-24 Thread Victor Stinner
2017-07-24 11:38 GMT+02:00 Alex Walters : > The promise that PEP-11 is making is that as long as a python was released > while Microsoft still supported that OS, and that python is still supported, > there will still be a python that works for you. So, yes, Windows XP is

Re: [Python-Dev] Is Windows XP still supported on Python 2.7?

2017-07-24 Thread Alex Walters
The promise that PEP-11 is making is that as long as a python was released while Microsoft still supported that OS, and that python is still supported, there will still be a python that works for you. So, yes, Windows XP is long since unsupported by Microsoft, but a disturbing number of people

[Python-Dev] Is Windows XP still supported on Python 2.7?

2017-07-24 Thread Victor Stinner
Hi, We have a Windows XP buildbot for Python 2.7, run by David Bolen: http://buildbot.python.org/all/builders/x86%20Windows%20XP%202.7/ test_bsddb3 fails randomly on this buildbot: http://bugs.python.org/issue30778 But Windows XP clearly reached its end-of-life, Microsoft doesn't support it

[Python-Dev] Python 3.5.4rc1 and 3.4.7rc1 slipping by a day, to July 24 2017

2017-07-24 Thread Larry Hastings
Release engineering for 3.5.4rc1 and 3.4.7rc1 took a lot longer than expected, because this is the first release using "blurb", and it turned out there was a lot of work left to do and a couple dark corners yet to stumble over. 3.5.4rc1 and 3.4.7rc1 will be released Monday, July 24, 2017.