Re: [Python-Dev] namedtuple implementation grumble

2014-06-07 Thread Nick Coghlan
On 8 Jun 2014 05:44, "Glenn Linderman" wrote: > > I wonder if the dynamically constructed classes approach could lead to the same space and time efficiencies... seems like I recall there being a discussion of efficiency, I think primarily space efficiency, as a justification for the present implem

Re: [Python-Dev] [numpy wishlist] Interpreter support for temporary elision in third-party classes

2014-06-07 Thread Greg Ewing
Nathaniel Smith wrote: For the numpy case, we really need to see all the operands, *and* know what the operation in question is... Okay, I see what you mean now. Given all that, it might be simpler just to have the method perform the operation itself if it can. It has all the information neces

[Python-Dev] cpython and python debugger documentation

2014-06-07 Thread Le Pa
Hi, I am interested in learning how the cpython interpreter is designed and implemented, and also how the python debugger works internally. My ultimate purpose is to modify them for my distributed computing needs. Are there any documentations on these please? I have done some goggling but failed

Re: [Python-Dev] namedtuple implementation grumble

2014-06-07 Thread Paul Sokolovsky
Hello, On Sat, 07 Jun 2014 12:42:32 -0700 Glenn Linderman wrote: > On 6/7/2014 7:50 AM, Antoine Pitrou wrote: > > Le 07/06/2014 09:25, R. David Murray a écrit : > >> On Fri, 06 Jun 2014 19:50:57 +0100, Chris Withers > >> wrote: > >>> I guess I could duck-type it based on the _fields attribute

Re: [Python-Dev] namedtuple implementation grumble

2014-06-07 Thread Glenn Linderman
On 6/7/2014 7:50 AM, Antoine Pitrou wrote: Le 07/06/2014 09:25, R. David Murray a écrit : On Fri, 06 Jun 2014 19:50:57 +0100, Chris Withers wrote: I guess I could duck-type it based on the _fields attribute but that feels implicit and fragile. What do you guys suggest? I seem to remember a

Re: [Python-Dev] [Python-ideas] Expose `itertools.count.start` and implement `itertools.count.__eq__` based on it, like `range`.

2014-06-07 Thread Neil Girdhar
On Sat, Jun 7, 2014 at 5:50 AM, Nick Coghlan wrote: > On 7 June 2014 19:36, Ram Rachum wrote: > > My need is to have an infinite immutable sequence. I did this for myself > by > > creating a simple `count`-like stateless class, but it would be nice if > that > > behavior was part of `range`. > >

Re: [Python-Dev] [numpy wishlist] Interpreter support for temporary elision in third-party classes

2014-06-07 Thread Nathaniel Smith
On Sat, Jun 7, 2014 at 1:37 AM, Greg Ewing wrote: > Julian Taylor wrote: >> >> tp_can_elide receives two objects and returns one of three values: >> * can work inplace, operation is associative >> * can work inplace but not associative >> * cannot work inplace > > > Does it really need to be that

Re: [Python-Dev] Moving Python 3.5 on Windows to a new compiler

2014-06-07 Thread Steve Dower
One more possible concern that I just thought of is the availability of the build tools on Windows Vista and Windows 7 RTM (that is, without SP1). I'd have to check, but I don't believe anything after VS 2012 is supported on Vista and it's entirely possible that installation is blocked. This

Re: [Python-Dev] Division of tool labour in porting Python 2 code to 2/3

2014-06-07 Thread Brett Cannon
On Sat Jun 07 2014 at 9:11:54 AM, Claudiu Popa wrote: > On Fri, Jun 6, 2014 at 7:37 PM, Brett Cannon wrote: > > After Glyph and Alex's email about their asks for assisting in writing > > Python 2/3 code, it got me thinking about where in the toolchain various > > warnings and such should go in o

Re: [Python-Dev] Moving Python 3.5 on Windows to a new compiler

2014-06-07 Thread Nathaniel Smith
Once 7 Jun 2014 06:19, "Nick Coghlan" wrote: > > On 7 June 2014 15:05, Donald Stufft wrote: > > I don’t particularly care too much though, I just think that bumping > > the compiler in a 2.7.Z release is a really bad idea and that either > > of the other two options are massively better. > > It i

Re: [Python-Dev] Division of tool labour in porting Python 2 code to 2/3

2014-06-07 Thread Claudiu Popa
On Fri, Jun 6, 2014 at 7:37 PM, Brett Cannon wrote: > After Glyph and Alex's email about their asks for assisting in writing > Python 2/3 code, it got me thinking about where in the toolchain various > warnings and such should go in order to help direct energy to help develop > whatever future too

Re: [Python-Dev] namedtuple implementation grumble

2014-06-07 Thread Antoine Pitrou
Le 07/06/2014 09:25, R. David Murray a écrit : On Fri, 06 Jun 2014 19:50:57 +0100, Chris Withers wrote: I've been trying to add support for explicit comparison of namedtuples into testfixtures and hit a problem which lead me to read the source and be sad. Rather than the mixin and class assem

Re: [Python-Dev] namedtuple implementation grumble

2014-06-07 Thread Nick Coghlan
On 7 June 2014 04:50, Chris Withers wrote: > Curious as to what lead to that implementation approach? What does it buy > that couldn't have been obtained by a mixin providing the functionality? In principle, you could get the equivalent of collections.namedtuple through dynamically constructed cl

Re: [Python-Dev] namedtuple implementation grumble

2014-06-07 Thread Steven D'Aprano
On Fri, Jun 06, 2014 at 07:50:57PM +0100, Chris Withers wrote: > Hi All, > > I've been trying to add support for explicit comparison of namedtuples > into testfixtures and hit a problem which lead me to read the source and > be sad. > > Rather than the mixin and class assembly in the function I

Re: [Python-Dev] namedtuple implementation grumble

2014-06-07 Thread R. David Murray
On Fri, 06 Jun 2014 19:50:57 +0100, Chris Withers wrote: > I've been trying to add support for explicit comparison of namedtuples > into testfixtures and hit a problem which lead me to read the source and > be sad. > > Rather than the mixin and class assembly in the function I expected to > f

[Python-Dev] namedtuple implementation grumble

2014-06-07 Thread Chris Withers
Hi All, I've been trying to add support for explicit comparison of namedtuples into testfixtures and hit a problem which lead me to read the source and be sad. Rather than the mixin and class assembly in the function I expected to find, I'm greeted by an exec of a string. Curious as to wha

Re: [Python-Dev] [Python-ideas] Expose `itertools.count.start` and implement `itertools.count.__eq__` based on it, like `range`.

2014-06-07 Thread Nick Coghlan
On 7 June 2014 19:36, Ram Rachum wrote: > My need is to have an infinite immutable sequence. I did this for myself by > creating a simple `count`-like stateless class, but it would be nice if that > behavior was part of `range`. Handling esoteric use cases like it sounds yours was is *why* user d

Re: [Python-Dev] Moving Python 3.5 on Windows to a new compiler

2014-06-07 Thread Giampaolo Rodola'
On Sat, Jun 7, 2014 at 7:05 AM, Donald Stufft wrote: > > I don’t particularly care too much though, I just think that bumping > the compiler in a 2.7.Z release is a really bad idea and that either > of the other two options are massively better. +1 -- Giampaolo - http://grodola.blogspot.com

Re: [Python-Dev] Moving Python 3.5 on Windows to a new compiler

2014-06-07 Thread Mark Lawrence
On 07/06/2014 02:13, Donald Stufft wrote: On Jun 6, 2014, at 9:05 PM, Terry Reedy wrote: On 6/6/2014 6:47 PM, Nathaniel Smith wrote: On Fri, Jun 6, 2014 at 11:43 PM, Sturla Molden wrote: Brett Cannon wrote: Nope. A new minor release of Python is a massive undertaking which is why we hav