Re: [Python-Dev] another Py_TPFLAGS_HEAPTYPE question

2009-08-17 Thread Joshua Haberman
On Mon, Aug 17, 2009 at 1:41 PM, "Martin v. Löwis" wrote: >>> As Benjamin says, this is getting off-topic - python-dev is not a place >>> to ask for help in your project. >> >> Please let me know where is a more suitable place to discuss the >> implementation of the cPython as it pertains to C exte

Re: [Python-Dev] PEP Submission

2009-08-17 Thread Martin v. Löwis
Guido van Rossum wrote: > Hm... I thought the address was p...@python.org? > > On Mon, Aug 17, 2009 at 8:19 AM, Eric Pruitt wrote: >> Several days ago, around the time the python.org servers went down, I >> submitted a PEP to edi...@python.org. When things to have been worked, >> I submitted the P

Re: [Python-Dev] VC++ versions to match python versions?

2009-08-17 Thread David Bolen
Chris Withers writes: > Is the Express Edition of Visual C++ 2008 suitable for compiling > packages for Python 2.6 on Windows? > (And Python 2.6 itself for that matter...) Yes - it's currently being used on my buildbot, for example, to build Python itself. Works for 2.6 and later. > Ditto for

Re: [Python-Dev] functools.compose to chain functions together

2009-08-17 Thread Martin v. Löwis
> I have never found these arguments compelling. They are obviously not > true (e.g., itertools.compress()[1] added in 2.7/3.1), and so what I > really hear is: "I don't like it and I outrank you." That certainly contributes to it - if you are not a committer, you have to find a committer that fin

Re: [Python-Dev] functools.compose to chain functions together

2009-08-17 Thread Martin v. Löwis
> and I don't see any reason why a compose() function shouldn't do the > same. I was tricked into reading it different when used with getters, i.e. l.sort(key=compose(attrgetter('name'),attrgetter('age'))) is too easy (IMO) to read as applying foo.name.age on all elements of the list. > (Asi

Re: [Python-Dev] another Py_TPFLAGS_HEAPTYPE question

2009-08-17 Thread Martin v. Löwis
>> As Benjamin says, this is getting off-topic - python-dev is not a place >> to ask for help in your project. > > Please let me know where is a more suitable place to discuss the > implementation of the cPython as it pertains to C extensions. I wrote > to python-dev only because the other lists a

Re: [Python-Dev] another Py_TPFLAGS_HEAPTYPE question

2009-08-17 Thread Joshua Haberman
On Sun, Aug 16, 2009 at 11:53 PM, "Martin v. Löwis" wrote: >> Thanks for the pointer.  I noticed that subtype_dealloc is only called for >> types >> that are allocated using type_new().  Does this mean that it is not >> safe to create >> types in C using just PyType_Ready() and set Py_TPFLAGS_HEAP

Re: [Python-Dev] PEP Submission

2009-08-17 Thread Guido van Rossum
Hm... I thought the address was p...@python.org? On Mon, Aug 17, 2009 at 8:19 AM, Eric Pruitt wrote: > Several days ago, around the time the python.org servers went down, I > submitted a PEP to edi...@python.org. When things to have been worked, > I submitted the PEP again. I have not seen any act

[Python-Dev] FAO John Arbash Meinel

2009-08-17 Thread Chris Withers
Mail Delivery System wrote: This is the mail system at host server1.simplistix.co.uk. I'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below. For further assistance, please send mail to postmaster. If you do so, please include th

Re: [Python-Dev] VC++ versions to match python versions?

2009-08-17 Thread Chris Withers
John Arbash Meinel wrote: Guppy doesn't compile on Windows. Pretty much full-stop. It uses static references to DLL functions, which on Windows is not allowed. This is no longer true as of the latest version of guppy... I've tried patching it to remove such things, and I finally got it to com

Re: [Python-Dev] VC++ versions to match python versions?

2009-08-17 Thread John Arbash Meinel
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chris Withers wrote: > Michael Foord wrote: >> D'oh. For 2.5 I mean. It may be *possible* though - just as you *can* >> build extensions for Python 2.5 on windows with mingw (with the >> appropriate distutils configuration), but there are pitfalls with

[Python-Dev] PEP Submission

2009-08-17 Thread Eric Pruitt
Several days ago, around the time the python.org servers went down, I submitted a PEP to edi...@python.org. When things to have been worked, I submitted the PEP again. I have not seen any activity on the PEP in Python-Dev or any reply acknowledging that it was received. Did I misunderstand the proc

Re: [Python-Dev] VC++ versions to match python versions?

2009-08-17 Thread Chris Withers
Michael Foord wrote: D'oh. For 2.5 I mean. It may be *possible* though - just as you *can* build extensions for Python 2.5 on windows with mingw (with the appropriate distutils configuration), but there are pitfalls with doing this. Yes, in my case I'm trying to compile guppy (for heapy, whic

Re: [Python-Dev] VC++ versions to match python versions?

2009-08-17 Thread Michael Foord
Michael Foord wrote: Chris Withers wrote: Hi All, Is the Express Edition of Visual C++ 2008 suitable for compiling packages for Python 2.6 on Windows? (And Python 2.6 itself for that matter...) I would think so - all you really need is the compiler (which the express version definitely inclu

Re: [Python-Dev] VC++ versions to match python versions?

2009-08-17 Thread Michael Foord
Chris Withers wrote: Hi All, Is the Express Edition of Visual C++ 2008 suitable for compiling packages for Python 2.6 on Windows? (And Python 2.6 itself for that matter...) I would think so - all you really need is the compiler (which the express version definitely includes). You may need to

Re: [Python-Dev] VC++ versions to match python versions?

2009-08-17 Thread Oleg Broytmann
On Mon, Aug 17, 2009 at 03:22:50PM +0100, Chris Withers wrote: > Is the Express Edition of Visual C++ 2008 suitable for compiling > packages for Python 2.6 on Windows? > (And Python 2.6 itself for that matter...) > > Ditto for 2.5, 3.1 and the trunk (which I guess becomes 3.2?) These two I kn

[Python-Dev] VC++ versions to match python versions?

2009-08-17 Thread Chris Withers
Hi All, Is the Express Edition of Visual C++ 2008 suitable for compiling packages for Python 2.6 on Windows? (And Python 2.6 itself for that matter...) Ditto for 2.5, 3.1 and the trunk (which I guess becomes 3.2?) cheers, Chris -- Simplistix - Content Management, Batch Processing & Python C

Re: [Python-Dev] functools.compose to chain functions together

2009-08-17 Thread Xavier Morel
On 17 Aug 2009, at 09:43 , Steven D'Aprano wrote: On Mon, 17 Aug 2009 08:10:16 am Martin v. Löwis wrote: I don't think he did. Comparing it to the one obvious solution (use a lambda expression), his only reasoning was "it is much easier to read". I truly cannot believe that a compose function w

Re: [Python-Dev] functools.compose to chain functions together

2009-08-17 Thread Antoine Pitrou
Le lundi 17 août 2009 à 20:53 +1000, Nick Coghlan a écrit : > P.S. PEP 309 is wrong when it says a C version probably isn't worthwhile > - between the time the PEP was first implemented and the time 2.5 was > actually released, enough investigation was done to show that the speed > gain from Hye-Sh

Re: [Python-Dev] functools.compose to chain functions together

2009-08-17 Thread Antoine Pitrou
Le lundi 17 août 2009 à 09:07 +0200, "Martin v. Löwis" a écrit : > Ok, that's also what the patch has proposed. I was puzzled when I read > >l.sort(key=compose(itemgetter(1), itemgetter(0 > > because I expected it to mean > >l.sort(key=lambda x:x[1][0]) But that's itemgetter's fault

Re: [Python-Dev] functools.compose to chain functions together

2009-08-17 Thread Nick Coghlan
Antoine Pitrou wrote: >> PEP 309 was written, discussed, approved, and implemented - that's how >> partial ended up in the stdlib. > > Ok, I'm surprised that a single addition to a module needed a PEP in > order to be approved. It makes a little more sense once you realise that there was no funct

Re: [Python-Dev] functools.compose to chain functions together

2009-08-17 Thread Stefan Behnel
Antoine Pitrou wrote: > Raymond Hettinger rcn.com> writes: >> IMO, its only virtue is that people coming from functional languages >> are used to having compose. Otherwise, it's a YAGNI. > > Then I wonder how partial() ended up in the stdlib. It seems hardly more > useful than compose(). I woul

Re: [Python-Dev] functools.compose to chain functions together

2009-08-17 Thread Steven D'Aprano
On Mon, 17 Aug 2009 08:10:16 am Martin v. Löwis wrote: > I don't think he did. Comparing it to the one obvious solution (use > a lambda expression), his only reasoning was "it is much easier to > read". I truly cannot believe that a compose function would be > easier to read to the average Python

Re: [Python-Dev] functools.compose to chain functions together

2009-08-17 Thread Scott Dial
Greg Ewing wrote: > Jason R. Coombs wrote: >> I had a use case that was compelling enough that I thought there >> should be something in functools to do what I wanted. > > I think this is one of those things that a small minority of > people would use frequently, but everyone else would use > very

Re: [Python-Dev] functools.compose to chain functions together

2009-08-17 Thread Martin v. Löwis
>> PEP 309 was written, discussed, approved, and implemented - that's how >> partial ended up in the stdlib. > > Ok, I'm surprised that a single addition to a module needed a PEP in > order to be approved. A PEP is generally needed if there is no easy consent achievable. It's not (primarily) the