Re: [Python-Dev] PEP 572: Assignment Expressions

2018-04-23 Thread Sven R. Kunze
On 23.04.2018 17:59, Steve Holden wrote: While Tim's expression might look (superficially) like C, the five-line alternative isn't exactly an inspiring example of Pythonicity, is it? What about diff = x - x_base if diff and gcd(diff, n) > 1: return gcd(diff, n) # or if (x - x_base)

Re: [Python-Dev] PEP 572: Assignment Expressions

2018-04-23 Thread Sven R. Kunze
On 23.04.2018 19:24, Chris Angelico wrote: On Tue, Apr 24, 2018 at 3:13 AM, Sven R. Kunze wrote: diff = x - x_base if diff and gcd(diff, n) > 1: return gcd(diff, n) # or if (x - x_base) and gcd(x - x_base, n) > 1: return gcd(x - x_base, n) and have the interpreter hand

Re: [Python-Dev] PEP 572: Assignment Expressions

2018-04-23 Thread Sven R. Kunze
On 23.04.2018 19:31, Tim Peters wrote: Surely you're joking. This is math.gcd(), which is expensive for multi-thousand bit integers, and the interpreter knows nothing about it. Adding a cache of _any_ kind (LRU or otherwise) would make it even slower. Alright, if that problem is just about perf

Re: [Python-Dev] PEP 572: Assignment Expressions

2018-04-23 Thread Sven R. Kunze
On 23.04.2018 22:37, Chris Angelico wrote: Ah, are you one of those programmers who writes code once and it's instantly perfect? I apologize, I didn't realize I was in the presence of a unicorn. Wow, constructive. Nothing is perfect, but if you don't consider your surroundings when doing chang

Re: [Python-Dev] PEP 572: Assignment Expressions

2018-04-23 Thread Sven R. Kunze
On 23.04.2018 23:19, Barry Warsaw wrote: I also think it effectively solves the switch-statement problem: if (get_response() as answer) == 'yes': do_it() elif answer == 'no': skip_it() elif answer == 'maybe' okay_then() That’s Pythonic enough for jazz! Is it just me or since wh

Re: [Python-Dev] PEP 572: Assignment Expressions

2018-04-24 Thread Sven R. Kunze
On 23.04.2018 23:41, Tim Peters wrote: Why? "Give the result of an expression a name" is already heavily used in Python - it's just that the _contexts_ in which it can be done are very limited now. Which is a good thing IMO. It keeps stuff simple to reason about. At least to me, the objective

Re: [Python-Dev] PEP 572: Assignment Expressions

2018-04-26 Thread Sven R. Kunze
On 25.04.2018 01:19, Steven D'Aprano wrote: Sorry, gcd(diff, n) is not the "perfect name", and I will tell you that sometimes g is better. [...] We were talking about the real-world code snippet of Tim (as a justification of := ) and alternative rewritings of it without resorting to new synta

Re: [Python-Dev] PEP 572: Write vs Read, Understand and Control Flow

2018-04-26 Thread Sven R. Kunze
On 24.04.2018 11:21, Victor Stinner wrote: I have been asked to express myself on the PEP 572. +1 I knew about the relationship between read and write. But your stance on debugging just makes it a thing. Thanks a lot! ___ Python-Dev mailing list Py

Re: [Python-Dev] [Python-checkins] cpython (3.4): Issue #23840: tokenize.open() now closes the temporary binary file on error to

2015-05-26 Thread R. David Murray
buffer.seek(0) > >>> +text = TextIOWrapper(buffer, encoding, line_buffering=True) > >>> +text.mode = 'r' > >>> +return text > >>> +except: > >>> +

Re: [Python-Dev] 2.7 is here until 2020, please don't call it a waste.

2015-06-03 Thread R. David Murray
On Wed, 03 Jun 2015 12:04:10 +0200, Maciej Fijalkowski wrote: > On Wed, Jun 3, 2015 at 11:38 AM, M.-A. Lemburg wrote: > > On 02.06.2015 21:07, Maciej Fijalkowski wrote: > >> Hi > >> > >> There was a PSF-sponsored effort to improve the situation with the > >> https://bitbucket.org/pypy/codespeed2/

Re: [Python-Dev] speed.python.org (was: 2.7 is here until 2020, please don't call it a waste.)

2015-06-04 Thread R. David Murray
> > we don't have any way of reliably and reproducibly testing Python > > performance. > > > > I'm very interested in speed.python.org and feel regret that the project is > > standing still. I have a mind to contribute something ... > > On 03.06.2015 18:

Re: [Python-Dev] Tracker reviews look like spam

2015-06-07 Thread R. David Murray
a name mapping to it nor a > reverse pointer from IP address to name in DNS. See the second-first > comment where R. David Murray states that "Mail is consistently sent from The ipv6 reverse dns issue is being worked on. ___ Python-Dev mailing l

Re: [Python-Dev] Tracker reviews look like spam

2015-06-09 Thread R. David Murray
On Tue, 09 Jun 2015 21:41:23 -, "Gregory P. Smith" wrote: > I *believe* you can get this to happen today in a review if you add the > [email protected] email address to the code review as the issueX > in the subject line will make the tracker turn it into a bug comment. If > so, hav

[Python-Dev] Importance of "async" keyword

2015-06-24 Thread Sven R. Kunze
d the async keyword. The PEP rationalizes its introduction with: "If useful() [...] would become a regular python function, [...] important() would be broken." What bothers me is, why should important() be broken in that case? Regards

Re: [Python-Dev] Importance of "async" keyword

2015-06-24 Thread Sven R. Kunze
Thanks, Yury, for you quick response. On 24.06.2015 22:16, Yury Selivanov wrote: Sven, if we don't have 'async def', and instead say that "a function is a *coroutine function* when it has at least one 'await' expression", then when you refactor "useful()" by removing the "await" from it, it st

Re: [Python-Dev] Importance of "async" keyword

2015-06-25 Thread Sven R. Kunze
On 25.06.2015 04:16, Steven D'Aprano wrote: On Wed, Jun 24, 2015 at 11:21:54PM +0200, Sven R. Kunze wrote: Thanks, Yury, for you quick response. On 24.06.2015 22:16, Yury Selivanov wrote: Sven, if we don't have 'async def', and instead say that "a function is a *co

Re: [Python-Dev] Importance of "async" keyword

2015-06-26 Thread Sven R. Kunze
return await open(unicode(a)).read() l = await complex_calc(a - 1) r = complex_calc(a - 2) return l + '; ' + r def business(): return complex_calc(5) def business_new() return await complex_calc(10) Maybe, I completely missed the point of the proposal, but this is the

Re: [Python-Dev] Importance of "async" keyword

2015-06-26 Thread R. David Murray
On Sat, 27 Jun 2015 01:10:33 +1000, Chris Angelico wrote: > The way I'm seeing it, coroutines are like cooperatively-switched > threads; you don't have to worry about certain operations being > interrupted (particularly low-level ones like refcount changes or list > growth), but any time you hit a

Re: [Python-Dev] Importance of "async" keyword

2015-06-30 Thread Sven R. Kunze
Hi, I have never said I wanted implicit asyncio. Explicit is the Python way after all, it served me well and I stick to that. I like the 'await' syntax to mark suspension points. But the 'async' coloring makes no sense to me. It is an implementation details of asyncio (IMHO). From what I

Re: [Python-Dev] Importance of "async" keyword

2015-07-02 Thread Sven R. Kunze
ble would be something similar to: call function: business as usual await function: suspension point and runs the function until completion call awaitable: runs the awaitable until completion await awaitable: suspension point and could be suspended internally as well On 02.07.2015 00:02, Greg Ewing

Re: [Python-Dev] Should asyncio ignore KeyboardInterrupt?

2015-07-04 Thread R. David Murray
Once long ago in Internet time (issue 581232) time.sleep on windows was not interruptible and this was fixed. Is it possible the work on EINTR has broken that fix? (I don't currently have 3.5 installed on windows to test that theory...) On Sat, 04 Jul 2015 17:46:34 +0200, Guido van Rossum wrote

[Python-Dev] What's New editing

2015-07-05 Thread R. David Murray
Just so people aren't caught unawares, it is very unlikely that I will have time to be the final editor on "What's New for 3.5" they way I was for 3.3 and 3.4. I've tried to encourage people to keep What's New up to date, but *someone* should make a final editing pass. Ideally they'd do at least

Re: [Python-Dev] Importance of "async" keyword

2015-07-05 Thread Sven R. Kunze
Thanks, Nick, for you reasoned response. On 03.07.2015 11:40, Nick Coghlan wrote: On 3 July 2015 at 06:55, Sven R. Kunze wrote: My understanding of coloring is "needs special treatment". Being special or not (containing an 'await' or not), as long as I don't need

Re: [Python-Dev] What's New editing

2015-07-05 Thread R. David Murray
On Mon, 06 Jul 2015 11:06:41 +1000, Nick Coghlan wrote: > On 6 July 2015 at 03:52, R. David Murray wrote: > > Just so people aren't caught unawares, it is very unlikely that I will have > > time to be the final editor on "What's New for 3.5" they way I was

Re: [Python-Dev] What's New editing

2015-07-06 Thread R. David Murray
On Mon, 06 Jul 2015 21:45:01 +0300, Serhiy Storchaka wrote: > On 05.07.15 20:52, R. David Murray wrote: > > Just so people aren't caught unawares, it is very unlikely that I will have > > time to be the final editor on "What's New for 3.5" they way I was for 3

Re: [Python-Dev] Importance of "async" keyword

2015-07-06 Thread Sven R. Kunze
On 06.07.2015 03:41, Nick Coghlan wrote: That said, I think there's definitely value in providing a very simple answer to the "how do I make a blocking call from a coroutine?" question, so I filed an RFE to add asyncio.blocking_call: http://bugs.python.org/issue24571 Nice step forward, Nick. Th

Re: [Python-Dev] Freeze exception for http://bugs.python.org/issue23661 ?

2015-07-13 Thread R. David Murray
On Tue, 14 Jul 2015 14:01:25 +1200, Robert Collins wrote: > So unittest.mock regressed during 3.5, and I found out when I released > the mock backport. > > The regression is pretty shallow - I've applied the fix to 3.6, its a > one-liner and comes with a patch. > > Whats the process for getting

Re: [Python-Dev] Cross compiling C-python 2.7.10 maintenance release for ARM on 64 bit x86_64 systems.

2015-07-14 Thread R. David Murray
On Tue, 14 Jul 2015 10:22:05 -, Andrew Robinson wrote: > I'm trying to cross compile C-python 2.7.10 for an embedded system. (Eg: > a Kobo reader). > But there appears to be some bugs that do not allow the latest > maintenance release of Python to correctly cross compile on an x86-64 > bui

Re: [Python-Dev] Where are bugs with the web site reported?

2015-07-16 Thread R. David Murray
On Thu, 16 Jul 2015 12:24:45 -0700, Glenn Linderman wrote: > On 7/16/2015 12:11 PM, Ryan Gonzalez wrote: > > I have encountered this weird issue on Chrome for Android where > > scrolling up just a little causes the page to dart to the top. I was > > going to report it in the bug tracker, but I

Re: [Python-Dev] Burning down the backlog.

2015-07-26 Thread R. David Murray
On Sun, 26 Jul 2015 22:59:51 +0100, Paul Moore wrote: > On 26 July 2015 at 16:39, Berker Peksağ wrote: > >> I'm not actually clear what "Commit Review" status means. I did do a > >> quick check of the dev guide, and couldn't come up with anything, > > > > https://docs.python.org/devguide/triagin

Re: [Python-Dev] Status on PEP-431 Timezones

2015-07-27 Thread R. David Murray
On Mon, 27 Jul 2015 02:09:19 -0500, Tim Peters wrote: > Seriously, try this exercise: how would you code Paul's example if > "your kind" of arithmetic were in use instead? For a start, you have > no idea in advance how many hours you may need to add to get to "the > same local time tomorrow". 2

Re: [Python-Dev] Status on PEP-431 Timezones

2015-07-27 Thread R. David Murray
On Mon, 27 Jul 2015 16:37:47 +0200, Lennart Regebro wrote: > On Mon, Jul 27, 2015 at 3:59 PM, R. David Murray > wrote: > > I don't remember what that does to the time, and I have > > no intuition about it (I just want it to do the naive arithmetic!) > > But what is

Re: [Python-Dev] Status on PEP-431 Timezones

2015-07-27 Thread Sven R. Kunze
I agree and my 2 cents: I can expect something different depending on the timezone and DST if I add years months weeks days hours minutes seconds to a given datetime Even though, in 90% of the cases, there is a more or less obvious conversion formula between all of them. But consider months t

Re: [Python-Dev] Status on PEP-431 Timezones

2015-07-29 Thread R. David Murray
On Wed, 29 Jul 2015 06:26:44 +0200, Lennart Regebro wrote: > On Tue, Jul 28, 2015 at 10:26 PM, Tim Peters wrote: > >> I have yet to see a use case for that. > > > > Of course you have. When you address them, you usually dismiss them > > as "calendar operations" (IIRC). > > Those are not usecase

Re: [Python-Dev] Issues not responded to.

2015-08-03 Thread R. David Murray
On Sun, 02 Aug 2015 21:47:23 +0530, Rustom Mody wrote: > [Yeah I am a lurker on the mentors list but I dont see much *technical* > discussion happening there] Yes, it's a mentoring list for how to contribute, not for technical issues, though we happily get in to technical issues when they arise.

Re: [Python-Dev] PEP-498: Literal String Formatting

2015-08-09 Thread Sven R. Kunze
After I read Nick's proposal and pondering over the 'f' vs. 'r' examples, I like the 'i' prefix more (regardless of the internal implementation). The best solution would be "without prefix and '{var}' only" syntax. Not sure if that is pos

Re: [Python-Dev] PEP needed for http://bugs.python.org/issue9232 ?

2015-08-11 Thread R. David Murray
On Tue, 11 Aug 2015 18:09:34 +1200, Robert Collins wrote: > So, there's a patch on issue 9232 - allow trailing commas in function > definitions - but there's been enough debate that I suspect we need a > PEP. > > Would love it if someone could correct me, but I'd like to be able to > either cat

Re: [Python-Dev] PEP needed for http://bugs.python.org/issue9232 ?

2015-08-11 Thread R. David Murray
On Tue, 11 Aug 2015 08:31:57 -0700, Chris Barker - NOAA Federal wrote: > Looking back at the previous discussion, it looked like it's all been > said, and there was almost unanimous approval (with some key mild > disapproval) for the idea, so what we need now is a pronouncement. And we got it, s

Re: [Python-Dev] trailing commas on statements

2015-08-11 Thread R. David Murray
On Wed, 12 Aug 2015 01:03:38 +1000, Chris Angelico wrote: > On Wed, Aug 12, 2015 at 12:46 AM, R. David Murray > wrote: > > (If you wanted to fix an 'oops' trailing comma syntax issue, I'd vote for > > disallowing trailing commas outside of (). The number o

Re: [Python-Dev] PEP-498: Literal String Formatting

2015-08-11 Thread Sven R. Kunze
Couldn't you just store the original format string at some __format_str__ attribute at the formatted string? Just in case you need it. x = f'{a}' => x = '{}'.format(a) # or whatever it turns out to be x.__format_str__ = '{a}' On 11.08.2015 17:16, Eric V. Smith wrote: On 08/11/2015 11:09 AM,

Re: [Python-Dev] About closures creates in exec

2015-08-12 Thread R. David Murray
On Wed, 12 Aug 2015 21:05:50 +0200, Andrea Griffini wrote: > Is it intended that closures created in exec statement/function cannot see > locals if the exec was provided a locals dictionary? > > This code gives an error ("foo" is not found during lambda execution): > > exec("def foo(x): retu

Re: [Python-Dev] How are we merging forward from the Bitbucket 3.5 repo?

2015-08-16 Thread R. David Murray
On Sun, 16 Aug 2015 00:13:10 -0700, Larry Hastings wrote: > > > So far I've accepted two pull requests into > bitbucket.com/larry/cpython350 in the 3.5 branch, what will become > 3.5.0rc2. As usual, it's the contributor's responsibility to merge > forward; if their checkin goes in to 3.5, it

Re: [Python-Dev] How are we managing 3.5 NEWS?

2015-08-16 Thread R. David Murray
The 3.5.0 patch flow question also brings up the question of how we are managing NEWS for 3.5.0 vs 3.5.1. We have some commits that are going in to both 3.5.0a2 and 3.5.1, and some that are only going in to 3.5.1. Currently the 3.5.1 NEWS says things are going in to 3.5.0a2, but that's obviously

Re: [Python-Dev] [python-committers] How are we merging forward from the Bitbucket 3.5 repo?

2015-08-16 Thread R. David Murray
On Sun, 16 Aug 2015 11:24:32 -0400, "R. David Murray" wrote: > On Sun, 16 Aug 2015 00:13:10 -0700, Larry Hastings wrote: > > 3. After your push request is merged, you pull from > > bitbucket.com/larry/cpython350 into hg.python.org/cpython and merge > >

Re: [Python-Dev] Burning down the backlog.

2015-08-18 Thread R. David Murray
On Tue, 18 Aug 2015 12:47:22 +1000, Ben Finney wrote: > Robert Collins writes: > > > However - 9 isn't a bad number for 'patches that the triagers think > > are ready to commit' inventory. > > > > So yay!. Also - triagers, thank you for feeding patches through the > > process. Please keep it up

Re: [Python-Dev] django_v2 benchmark compatibility fix for Python 3.6

2015-08-25 Thread R. David Murray
On Tue, 25 Aug 2015 13:11:37 -, "Papa, Florin" wrote: > My name is Florin Papa and I work in the Server Languages Optimizations Team > at Intel Corporation. > > I would like to submit a patch that solves compatibility issues of the > django_v2 benchmark in the Grand Unified Python Benchmar

Re: [Python-Dev] django_v2 benchmark compatibility fix for Python 3.6

2015-08-25 Thread R. David Murray
On Tue, 25 Aug 2015 11:18:54 -0400, Terry Reedy wrote: > On 8/25/2015 10:51 AM, R. David Murray wrote: > > On Tue, 25 Aug 2015 13:11:37 -, "Papa, Florin" > > wrote: > >> My name is Florin Papa and I work in the Server Languages Optimizations > >

Re: [Python-Dev] Profile Guided Optimization active by-default

2015-08-25 Thread R. David Murray
On Tue, 25 Aug 2015 15:59:23 -, Brett Cannon wrote: > On Mon, 24 Aug 2015 at 23:19 Nick Coghlan wrote: > > > On 25 August 2015 at 05:52, Gregory P. Smith wrote: > > > What we tested and decided to use on our own builds after benchmarking at > > > work was to build with: > > > > > > make pro

Re: [Python-Dev] Testing tkinter on Linux

2015-08-27 Thread R. David Murray
On Thu, 27 Aug 2015 14:24:36 -0400, Terry Reedy wrote: > On 8/27/2015 12:35 AM, Chris Angelico wrote: > > On Thu, Aug 27, 2015 at 2:20 PM, Terry Reedy wrote: > >> None of the linux buildbots run with X enabled. Consequently none of the > >> tkinter (or tkinter user) gui tests are run on Linux.

Re: [Python-Dev] PEP 498: Literal String Interpolation is ready for pronouncement

2015-09-06 Thread Sven R. Kunze
On 05.09.2015 12:58, Chris Angelico wrote: On Sat, Sep 5, 2015 at 8:57 PM, Chris Angelico wrote: IMHO the main advantage of allowing expressions inside f-string is that it adds something really new compared to the current str.format() method. Without it, f-string are less interesting. I agree

Re: [Python-Dev] Yet another "A better story for multi-core Python" comment

2015-09-08 Thread R. David Murray
On Tue, 08 Sep 2015 10:12:37 -0400, Gary Robinson wrote: > 2) Have a mode where a particular data structure is not reference > counted or garbage collected. This sounds kind of like what Trent did in PyParallel (in a more generic way). --David ___ Pyth

Re: [Python-Dev] Yet another "A better story for multi-core Python" comment

2015-09-08 Thread Sven R. Kunze
On 08.09.2015 19:17, R. David Murray wrote: On Tue, 08 Sep 2015 10:12:37 -0400, Gary Robinson wrote: 2) Have a mode where a particular data structure is not reference counted or garbage collected. This sounds kind of like what Trent did in PyParallel (in a more generic way). Yes, I can

Re: [Python-Dev] what is wrong with hg.python.org

2015-09-09 Thread R. David Murray
On Wed, 09 Sep 2015 20:02:38 +0200, Ivan Levkivskyi wrote: > https://hg.python.org/ returns 503 Service Unavailable for an hour or so. > Is it a maintenance? When it is expected to end? It was an attempt at maintenance (upgrade) that went bad. No ETA yet, I'm afraid. The repo is still ssh acce

Re: [Python-Dev] Can't post to bugs.python.org

2015-09-10 Thread R. David Murray
On Thu, 10 Sep 2015 13:27:42 +0300, Serhiy Storchaka wrote: > I can't neither post a message to existing issue nor open a new issue. > The irker854 bot on IRC channel #python-dev cites my message and the > tracker updates activity time of existing issue, but doesn't show my > message and doesn

Re: [Python-Dev] Can't post to bugs.python.org

2015-09-10 Thread R. David Murray
On Thu, 10 Sep 2015 09:02:01 -0400, "R. David Murray" wrote: > If this continues to plague you, we'll probably need to do some live > debugging. You can ping me (bitdancer) on IRC, I should be on for the > next 8 hours or so. This turns out to have been specific to

Re: [Python-Dev] PEP: Collecting information about git

2015-09-15 Thread R. David Murray
On Tue, 15 Sep 2015 20:32:33 +0200, Georg Brandl wrote: > On 09/15/2015 08:22 PM, Guido van Rossum wrote: > > For one, because *I* have been a (moderate) advocate for switching to git > > and > > GitHub. > > Fair enough. Still strange to read this PEP with the explicit caveat of > "The author of

Re: [Python-Dev] PEP: Collecting information about git

2015-09-16 Thread R. David Murray
On Wed, 16 Sep 2015 19:59:28 +1000, Chris Angelico wrote: > On Wed, Sep 16, 2015 at 7:46 PM, Oleg Broytman wrote: > > For example, I develop > > SQLObject using two private clones (clean backup repo and dirty working > > repo) and three public clones at Gitlab, GutHub and SourceForge. They > > ar

Re: [Python-Dev] PEP: Collecting information about git

2015-09-16 Thread R. David Murray
On Wed, 16 Sep 2015 09:17:38 -0700, Nikolaus Rath wrote: > On Sep 16 2015, "R. David Murray" wrote: > > The DAG plus git branches-as-labels *fits in my head* in a way that the > > DAG plus named-branches-and-other-things does not. > > Hmm, that's odd. As f

Re: [Python-Dev] My collection of Python 3.5.0 regressions

2015-09-18 Thread R. David Murray
Once Steve comes back from vacation he's going to have a lot of Windows install issues to look at. IMO, we should resolve those, and then issue 3.5.1. It's really too bad more people didn't test the installation with the release candidates, and I'm very glad that those people who did so did so...

Re: [Python-Dev] Proposing the deprecation of the pyvenv script

2015-09-19 Thread Sven R. Kunze
On 19.09.2015 07:24, Stephen J. Turnbull wrote: Barry Warsaw writes: > One thing that came up in a similar discussion is pip, and the > suggested move to `python -m pip`, which makes a lot of sense. > However, *inside* a virtualenv, there's no ambiguity about the > Python version associa

Re: [Python-Dev] Proposing the deprecation of the pyvenv script

2015-09-19 Thread Sven R. Kunze
On 19.09.2015 14:44, Paul Moore wrote: On 19 September 2015 at 10:12, Sven R. Kunze wrote: The only question I have: is there a particular reason (not technical one) why there are many pips on my PC? That's not an unreasonable question, but (IMO) most of the answers are technical, or a

Re: [Python-Dev] Proposing the deprecation of the pyvenv script

2015-09-19 Thread Sven R. Kunze
On 19.09.2015 19:19, Paul Moore wrote: I thought my point was "yes, go for it - your code contribution would be appreciated" :-) Paul Well, before coding shouldn't we have vision and a plan for pip somehow and pinpoint it somewhere where everybody who's willing to contribute can see it? Do

Re: [Python-Dev] xunit unittest.TestSuite

2015-09-26 Thread R. David Murray
On Sat, 26 Sep 2015 10:26:39 -0700, vijayram wrote: > I am facing this same issue described here: > https://github.com/nose-devs/nose/issues/542 > > > any alternative or solution to this issue that anyone is aware of... please > kindly suggest...

Re: [Python-Dev] Committing a bug fix

2015-09-27 Thread R. David Murray
On Sun, 27 Sep 2015 21:08:02 -0400, Alexander Belopolsky wrote: > Can someone remind me which branches regular (non-security) bug fixes go to > these days? See for context. 3.4, 3.5, and default. (3.4 for only another few weeks.) --David ___

Re: [Python-Dev] Not Deprecating Arbitrary Function Annotations

2015-10-05 Thread Sven R. Kunze
Not really being affected by the "python annotation movement", I supply some non-constructive comment: I would not prefer any of these outcomes but would always allow all possible meanings that people wish to encode in the annotations. My $0.02 and I am out. On 05.10.2015 22:46, Steve Wed

Re: [Python-Dev] Rationale behind lazy map/filter

2015-10-13 Thread R. David Murray
On Tue, 13 Oct 2015 14:59:56 +0300, Stefan Mihaila wrote: > Maybe it's just python2 habits, but I assume I'm not the only one > carelessly thinking that "iterating over an input a second time will > result in the same thing as the first time (or raise an error)". This is the way iterators have

Re: [Python-Dev] Rationale behind lazy map/filter

2015-10-13 Thread R. David Murray
On Tue, 13 Oct 2015 11:26:09 -0400, Random832 wrote: > "R. David Murray" writes: > > > On Tue, 13 Oct 2015 14:59:56 +0300, Stefan Mihaila > > wrote: > >> Maybe it's just python2 habits, but I assume I'm not the only one > >> carelessly t

Re: [Python-Dev] PEP 0484 - the Numeric Tower

2015-10-13 Thread Sven R. Kunze
On 13.10.2015 17:38, Raymond Hettinger wrote: Traceback (most recent call last): File "", line 1, in Decimal('3.14') + 2.71828 TypeError: unsupported operand type(s) for +: 'decimal.Decimal' and 'float' Reminds me of 'int' and 'long'. Different but almost the same. Best, Sven

Re: [Python-Dev] Rationale behind lazy map/filter

2015-10-13 Thread R. David Murray
On Tue, 13 Oct 2015 12:08:12 -0400, Random832 wrote: > "R. David Murray" writes: > > On Tue, 13 Oct 2015 11:26:09 -0400, Random832 > > wrote: > > > > And the answer to the question is: lots of code. I've written some: > > code that iterates an

Re: [Python-Dev] Should PEP 498 specify if rf'...' is valid?

2015-10-22 Thread Sven R. Kunze
On 22.10.2015 13:32, Eric V. Smith wrote: ['B', 'BF', 'BFR', 'BFr', 'BR', 'BRF', 'BRf', 'Bf', 'BfR', 'Bfr', 'Br', 'BrF', 'Brf', 'F', 'FB', '

Re: [Python-Dev] Should PEP 498 specify if rf'...' is valid?

2015-10-22 Thread Sven R. Kunze
On 22.10.2015 18:17, Ryan Gonzalez wrote: anything about it. 'FbR', really? Why not disallowing them? I for one could live with all-lower-case AND a predefined order. Well, now it's backwards-compatibility. Huh? There are no fb strings yet. Best, Sven

Re: [Python-Dev] Should PEP 498 specify if rf'...' is valid?

2015-10-22 Thread Sven R. Kunze
fbR didn't. On Thu, Oct 22, 2015 at 12:02 PM, Sven R. Kunze <mailto:[email protected]>> wrote: On 22.10.2015 18:17, Ryan Gonzalez wrote: anything about it. 'FbR', really? Why not disallowing them? I for one could live with

Re: [Python-Dev] Generated Bytecode ...

2015-10-22 Thread R. David Murray
On Thu, 22 Oct 2015 17:02:48 -, Brett Cannon wrote: > On Thu, 22 Oct 2015 at 09:37 Stéphane Wirtel wrote: > > > Hi all, > > > > When we compile a python script > > > > # test.py > > if 0: > > x = 1 > > > > python -mdis test.py > > > > There is no byte code for the condition. > > > >

Re: [Python-Dev] Should PEP 498 specify if rf'...' is valid?

2015-10-26 Thread Sven R. Kunze
On 26.10.2015 16:22, Ethan Furman wrote: On 10/23/2015 08:20 AM, Nick Coghlan wrote: My own objection isn't to allowing "fR" or "fbR", it's to allowing the uppercase "F". I also don't understand why we can't say "if 'f' is part of a string prefix, it must be first". Sometimes order matters, a

Re: [Python-Dev] Should PEP 498 specify if rf'...' is valid?

2015-10-27 Thread Sven R. Kunze
On 26.10.2015 20:54, Ethan Furman wrote: You misunderstand -- the order of string prefixes does *not* matter, so forcing us to use one is silly. I don't think so. It's better to have less possibilities in the beginning. So later on, we can easily relax the restrictions without breaking compat

Re: [Python-Dev] Should PEP 498 specify if rf'...' is valid?

2015-10-27 Thread Sven R. Kunze
On 27.10.2015 22:19, Eric V. Smith wrote: On Oct 27, 2015, at 4:39 PM, Mark Lawrence wrote: On 27/10/2015 18:39, Sven R. Kunze wrote: On 26.10.2015 20:54, Ethan Furman wrote: You misunderstand -- the order of string prefixes does *not* matter, so forcing us to use one is silly. I don't

Re: [Python-Dev] If you shadow a module in the standard library that IDLE depends on, bad things happen

2015-10-29 Thread R. David Murray
On Thu, 29 Oct 2015 16:56:38 -0700, Nathaniel Smith wrote: > On Thu, Oct 29, 2015 at 1:50 PM, Ryan Gonzalez wrote: > > Why not just check the path of the imported modules and compare it with the > > Python library directory? > > It works, but it requires that everyone who could run into this > p

Re: [Python-Dev] Second milestone of FAT Python

2015-11-04 Thread Sven R. Kunze
Hi Victor, great to hear. I think everybody here appreciates your efforts. Do you think there will be any change of merging this back into CPython? Best, Sven On 04.11.2015 09:50, Victor Stinner wrote: Hi, I'm writing a new "FAT Python" project to try to implement optimizations in CPython (

Re: [Python-Dev] Second milestone of FAT Python

2015-11-04 Thread Sven R. Kunze
typo: "chance" instead of "change" On 04.11.2015 21:14, Sven R. Kunze wrote: Hi Victor, great to hear. I think everybody here appreciates your efforts. Do you think there will be any change of merging this back into CPython? Best, Sven On 04.11.2015 09:50, Victor Stin

Re: [Python-Dev] Rationale behind lazy map/filter

2015-11-05 Thread R. David Murray
On Thu, 05 Nov 2015 03:59:05 +, Michael Selik wrote: > > I'm not suggesting restarting at the top (I've elsewhere suggested that > > many such methods would be better as an *iterable* that can be restarted > > at the top by calling iter() multiple times, but that's not the same > > thing). I'm

Re: [Python-Dev] doc tests failing

2015-11-13 Thread R. David Murray
We don't have clean doctests for the docs. Patches welcome. At one point I had made the turtle doctests pass (it draws a bunch of stuff on the screen) because otherwise we don't have very many turtle tests, but I haven't checked it in a couple years. Hmm. We could list making the doc doctests p

Re: [Python-Dev] Benchmark results across all major Python implementations

2015-11-16 Thread R. David Murray
On Mon, 16 Nov 2015 21:23:49 +0100, Maciej Fijalkowski wrote: > Any thoughts on improving the benchmark set (I think all of > {cpython,pypy,pyston} introduced new benchmarks to the set). > "speed.python.org" becoming a thing is generally stopped on "noone > cares enough to set it up". Actually, w

Re: [Python-Dev] Benchmark results across all major Python implementations

2015-11-17 Thread R. David Murray
On Mon, 16 Nov 2015 23:37:06 +, "Stewart, David C" wrote: > Last June we started publishing a daily performance report of the latest > Python tip against the previous day's run and some established synch point. > We mail these to the community to act as a "canary in the coal mine." I wrote

Re: [Python-Dev] Benchmark results across all major Python implementations

2015-11-18 Thread R. David Murray
On 17 Nov 2015, at 21:22, Stewart, David C wrote: > On 11/17/15, 10:40 AM, "Python-Dev on behalf of R. David Murray" > [email protected]> wrote: >> >> I suppose that for this to have maximum effect someone would have to >> specifically be paying attentio

Re: [Python-Dev] Request for pronouncement on PEP 493 (HTTPS verification backport guidance)

2015-11-25 Thread R. David Murray
On Thu, 26 Nov 2015 09:17:02 +1300, Robert Collins wrote: > On 26 November 2015 at 08:57, Barry Warsaw wrote: > > There's a lot to process in this thread, but as I see it, the issue breaks > > down to these questions: > > > > * How should PEP 493 be implemented? > > > > * What should the default

Re: [Python-Dev] Avoiding CPython performance regressions

2015-11-30 Thread R. David Murray
On Mon, 30 Nov 2015 09:02:12 -0200, Fabio Zadrozny wrote: > Note that uploading the data to SpeedTin should be pretty straightforward > (by using https://github.com/fabioz/pyspeedtin, so, the main issue would be > setting up o machine to run the benchmarks). Thanks, but Zach almost has this worki

Re: [Python-Dev] Python Language Reference has no mention of list comÃprehensions

2015-12-03 Thread R. David Murray
On Thu, 03 Dec 2015 16:15:30 +, MRAB wrote: > On 2015-12-03 15:09, Random832 wrote: > > On 2015-12-03, Laura Creighton wrote: > >> Who came up with the word 'display' and what does it have going for > >> it that I have missed? Right now I think its chief virtue is that > >> it is a meaningle

Re: [Python-Dev] Python Language Reference has no mention of list comÃprehensions

2015-12-04 Thread R. David Murray
On Fri, 04 Dec 2015 18:38:03 +1000, Nick Coghlan wrote: > Summarising that idea: > > * literals: any of the dedicated expressions that produce an instance > of a builtin type > * constant literal: literals that produce a constant object that can > be cached in the bytecode > * dynamic literal: li

Re: [Python-Dev] "python.exe is not a valid Win32 app"

2015-12-15 Thread R. David Murray
On Tue, 15 Dec 2015 15:41:35 +0100, Laura Creighton wrote: > In a message of Tue, 15 Dec 2015 11:46:03 +0100, Armin Rigo writes: > >Hi all, > > > >On Tue, Dec 1, 2015 at 8:13 PM, Laura Creighton wrote: > >> Python 3.5 is not supported on windows XP. Upgrade your OS or > >> stick with 3.4 > > > >

Re: [Python-Dev] Asynchronous context manager in a typical network server

2015-12-18 Thread R. David Murray
On Fri, 18 Dec 2015 18:29:35 +0200, Andrew Svetlov wrote: > I my asyncio code typical initialization/finalization procedures are > much more complicated. > I doubt if common code can be extracted into asyncio. > Personally I don't feel the need for `wait_forever()` or > `loop.creae_context_task()

Re: [Python-Dev] Asynchronous context manager in a typical network server

2015-12-20 Thread Sven R. Kunze
On 18.12.2015 22:09, Guido van Rossum wrote: I guess we could make the default arg to sleep() 1e9. Or make it None and special-case it. I don't feel strongly about this -- I'm not sure how baffling it would be to accidentally leave out the delay and find your code sleeps forever rather than rai

Re: [Python-Dev] Code formatter bot

2016-01-19 Thread Sven R. Kunze
Not a core dev, but I would definitely recommend using them. Best, Sven On 19.01.2016 21:59, francismb wrote: Dear Core-Devs, what's your opinion about a code-formatter bot for cpython. Pros, Cons, where could be applicable (new commits, new workflow, it doesn't make sense), ... - At least it

Re: [Python-Dev] FAT Python (lack of) performance

2016-01-25 Thread Sven R. Kunze
Hi Victor, I encourage you to proceed here. I would love to see your PEPs (509-511) incorporated into CPython. It's not that I consider Python slow (although some folks claim so), but performance improvements are always welcome; especially when I glance over diagrams like those: http://blog.c

Re: [Python-Dev] FAT Python (lack of) performance

2016-01-26 Thread Sven R. Kunze
Hi, will look into it soon. :) Best, Sven On 26.01.2016 16:32, Victor Stinner wrote: Hi, 2016-01-26 3:21 GMT+01:00 INADA Naoki : How can I help your work? I don't know exactly yet, but I started to write a documentation to explain how to contribute: http://faster-cpython.readthedocs.org/fat

Re: [Python-Dev] FAT Python (lack of) performance

2016-01-26 Thread Sven R. Kunze
I completely agree with INADA. It's like saying, because a specific crossroad features a higher accident rate, *people need to change their driving behavior*. *No!* People won't change and it's not necessary either. The crossroad needs to be changed to be safer. Same goes for Python. If it's

Re: [Python-Dev] FAT Python (lack of) performance

2016-01-27 Thread Sven R. Kunze
On 27.01.2016 11:59, Terry Reedy wrote: On 1/26/2016 12:35 PM, Sven R. Kunze wrote: I completely agree with INADA. I an not sure you do. I am sure I am. He wants to solve a problem the way that is natural to him as a unique human being. It's like saying, because a specific cros

Re: [Python-Dev] FAT Python (lack of) performance

2016-01-27 Thread Sven R. Kunze
On 27.01.2016 12:16, Nick Coghlan wrote: On 27 January 2016 at 03:35, Sven R. Kunze wrote: I completely agree with INADA. It's like saying, because a specific crossroad features a higher accident rate, people need to change their driving behavior. No! People won't change an

Re: [Python-Dev] FAT Python (lack of) performance

2016-01-27 Thread Sven R. Kunze
On 27.01.2016 19:33, Brett Cannon wrote: And this is why this entire email thread has devolved into a conversation that isn't really going anywhere. This whole thread has completely lost track of the point of Victor's earlier email saying "I'm still working on my FAT work and don't take any not

Re: [Python-Dev] More optimisation ideas

2016-01-30 Thread Sven R. Kunze
On 30.01.2016 19:20, Serhiy Storchaka wrote: AFAIK the most time is spent in system calls like stat or open. Archiving the stdlib into the ZIP file and using zipimport can decrease Python startup time (perhaps there is an open issue about this). Oh, please don't. One thing I love about Python

Re: [Python-Dev] More optimisation ideas

2016-01-30 Thread Sven R. Kunze
On 30.01.2016 21:32, Brett Cannon wrote: On Sat, Jan 30, 2016, 12:30 Sven R. Kunze <mailto:[email protected]>> wrote: On 30.01.2016 19:20, Serhiy Storchaka wrote: > AFAIK the most time is spent in system calls like stat or open. > Archiving the stdlib into the ZIP

<    1   2   3   4   5   6   7   8   9   10   >