Re: [Python-Dev] I think setup.py needs major rework

2005-01-25 Thread Fred L. Drake, Jr.
On Tuesday 25 January 2005 23:30, Skip Montanaro wrote: > Python's setup.py has grown way out of control. I'm trying to build > and install Python 2.4.0 on a Solaris system with Tcl/Tk installed in a > non-standard place and I can't figure out the incantation to tell setup.py > to look whe

Re: [Python-Dev] Speed up function calls

2005-01-25 Thread Kurt B. Kaiser
Neal Norwitz <[EMAIL PROTECTED]> writes: >> * not handling more than nine arguments, > > There are very few functions I've found that take more than 2 > arguments. Should 9 be lower, higher? I don't have a good feel. > From what I've seen, 5 may be more reasonable as far as catching 90% > of the

[Python-Dev] I think setup.py needs major rework

2005-01-25 Thread Skip Montanaro
I just submitted a bug report for setup.py: http://python.org/sf/1109602 It begins: Python's setup.py has grown way out of control. I'm trying to build and install Python 2.4.0 on a Solaris system with Tcl/Tk installed in a non-standard place and I can't figure out the incantati

Re: [Python-Dev] Allowing slicing of iterators

2005-01-25 Thread Nick Coghlan
Steven Bethard wrote: If we're really looking for a builtin, wouldn't it be better to go the route of getattr/setattr and have something like getslice that could operate on both lists and iterators? Such a builtin should probably be getitem() rather than getslice() (since getitem(iterable, slice(s

Re: [Python-Dev] Speed up function calls

2005-01-25 Thread Nick Coghlan
Neal Norwitz wrote: So far it seems there isn't any specific problems with the approach. There are simply concerns. I not sure it would be best to modify this patch over many iterations and then make one huge checkin. I also don't want to lose the changes or the results. Perhaps I should make a

Re: [Python-Dev] Speed up function calls

2005-01-25 Thread Neal Norwitz
On Tue, 25 Jan 2005 06:42:57 -0500, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > > > > I think tested a method I changed from METH_O to METH_ARGS and could > > not measure a difference. > > Something is probably wrong with the measurements. The new call does much > more work than METH_O or MET

Re: [Python-Dev] Deprecating modules (python-dev summary for early Dec, 2004)

2005-01-25 Thread Skip Montanaro
Jim> Would it make sense to add an attic (or even "deprecated") Jim> directory to the end of sys.path, and move old modules there? This Jim> would make the search for non-deprecated modules a bit faster, and Jim> would make it easier to verify that new code isn't depending Jim

Re: [Python-Dev] Deprecating modules (python-dev summary for early Dec, 2004)

2005-01-25 Thread Jim Jewett
On Tue, 25 Jan 2005 16:21:34 -0600, Skip Montanaro <[EMAIL PROTECTED]> wrote: > > Jim> Would it make sense to add an attic (or even "deprecated") > Jim> directory to the end of sys.path, and move old modules there? This > Jim> would make the search for non-deprecated modules a bit fas

Re: [Python-Dev] __str__ vs. __unicode__

2005-01-25 Thread Walter Dörwald
M.-A. Lemburg wrote: Walter Dörwald wrote: M.-A. Lemburg wrote: > [...] __str__ and __unicode__ as well as the other hooks were specifically added for the type constructors to use. However, these were added at a time where sub-classing of types was not possible, so it's time now to reconsider whet

[Python-Dev] Deprecating modules (python-dev summary for early Dec, 2004)

2005-01-25 Thread Jim Jewett
> It was also agreed that deleting deprecated modules was not needed; it breaks > code and disk space is cheap. > It seems that no longer listing documentation and adding a deprecation > warning > is what is needed to properly deprecate a module. By no longer listing > documentation new progr

Re: [Python-Dev] Allowing slicing of iterators

2005-01-25 Thread Steven Bethard
Raymond Hettinger <[EMAIL PROTECTED]> wrote: > > FWIW, someone (Bengt Richter perhaps) once suggested syntactic support > differentiated from sequences but less awkward than a call to > itertools.islice(). > > itertools.islice(someseq, lo, hi) would be rendered as someseq'[lo:hi]. Just to make s

RE: [Python-Dev] state of 2.4 final release

2005-01-25 Thread Raymond Hettinger
[Anthony Baxter] > >>> I'm > >>> not aware of anyone having done a fix for the issue Tim identified > >>> ( http://www.python.org/sf/1069160 ) [Raymond Hettinger] > > Any chance of this getting fixed before 2.4.1 goes out in February? [Timbot] > It probably won't be fixed by me. It would be bett

RE: [Python-Dev] Allowing slicing of iterators

2005-01-25 Thread Raymond Hettinger
> Iterators are for single sequential access. It's a feature that you > have to import itertools (or at least that you have to invoke its > special operations) -- iterators are not sequences and shouldn't be > confused with such. FWIW, someone (Bengt Richter perhaps) once suggested syntactic suppo

Re: [Python-Dev] Allowing slicing of iterators

2005-01-25 Thread Josiah Carlson
Nick Coghlan <[EMAIL PROTECTED]> wrote: > Guido van Rossum wrote: > > Since we already have the islice iterator, what's the point? > > I'd like to see iterators become as easy to work with as lists are. At the > moment, anything that returns an iterator forces you to use the relatively > cumber

Re: [Python-Dev] Allowing slicing of iterators

2005-01-25 Thread Steven Bethard
Nick Coghlan wrote: > In the example below (printing the first 3 items of a sequence), the fact that > sorted() produces a new iterable list, while reversed() produces an iterator > over the original list *should* be an irrelevant implementation detail from > the > programmer's point of view. You

Re: [Python-Dev] Allowing slicing of iterators

2005-01-25 Thread Guido van Rossum
[me] > > Since we already have the islice iterator, what's the point? [Nick] > I'd like to see iterators become as easy to work with as lists are. At the > moment, anything that returns an iterator forces you to use the relatively > cumbersome itertools.islice mechanism, rather than Python's nativ

Re: [Python-Dev] Re: [PyCON-Organizers] PyCon: The Spam Continues ; -)

2005-01-25 Thread Bob Ippolito
On Jan 25, 2005, at 12:29, David Ascher wrote: Steve Holden wrote: Modulo some SQLServer features we're using. Well free-text indexing would be my first guess. Anything else of interest? MySQL's free text indexing really sucks compared with SQL Server's, which to my mind is a good justification f

[Python-Dev] Re: Allowing slicing of iterators

2005-01-25 Thread Fredrik Lundh
Guido van Rossum wrote: >> As a trivial example, here's how to skip the head of a zero-numbered list: >> >>for i, item in enumerate("ABCDEF")[1:]: >> print i, item >> >> Is this idea a non-starter, or should I spend my holiday on Wednesday >> finishing >> it off and writing the documenta

[Python-Dev] Re: [PyCON-Organizers] PyCon: The Spam Continues ;-)

2005-01-25 Thread David Ascher
Steve Holden wrote: Modulo some SQLServer features we're using. Well free-text indexing would be my first guess. Anything else of interest? MySQL's free text indexing really sucks compared with SQL Server's, which to my mind is a good justification for the Microsoft product. Freetext search is o

Re: [Python-Dev] state of 2.4 final release

2005-01-25 Thread Tim Peters
[Anthony Baxter] >>> I didn't see any replies to the last post, so I'll ask again with a >>> better subject line - as I said last time, as far as I'm aware, I'm >>> not aware of anyone having done a fix for the issue Tim identified >>> ( http://www.python.org/sf/1069160 ) >>> >>> So, my question is

RE: [Python-Dev] state of 2.4 final release

2005-01-25 Thread Raymond Hettinger
> [Anthony Baxter] > > I didn't see any replies to the last post, so I'll ask again with a > > better subject line - as I said last time, as far as I'm aware, I'm > > not aware of anyone having done a fix for the issue Tim identified > > ( http://www.python.org/sf/1069160 ) > > > > So, my question

Re: [Python-Dev] Strange segfault in Python threads and linux kernel 2.6

2005-01-25 Thread Anthony Baxter
On Wednesday 26 January 2005 01:01, Donovan Baarda wrote: > In this case it turns out to be "don't do exec() in a thread, because what > you exec can have all it's signals masked". That turns out to be a hell of > a lot of things; popen, os.command, etc. They all only work OK in a > threaded applic

Re: [Python-Dev] Strange segfault in Python threads and linux kernel 2.6

2005-01-25 Thread Donovan Baarda
G'day, From: "Anthony Baxter" <[EMAIL PROTECTED]> > On Thursday 20 January 2005 12:43, Donovan Baarda wrote: > > On Wed, 2005-01-19 at 13:37 +, Michael Hudson wrote: > > > The main oddness about python threads (before 2.3) is that they run > > > with all signals masked. You could play with a

Re: [Python-Dev] Allowing slicing of iterators

2005-01-25 Thread Nick Coghlan
Batista, Facundo wrote: I think that breaking the common idiom... for e in something[:]: something.remove(e) is a no-no... The patch doesn't change existing behaviour - anything which is already sliceable (e.g. lists) goes through the existing __getitem__ or __getslice__ code paths. All

Re: [Python-Dev] Allowing slicing of iterators

2005-01-25 Thread Nick Coghlan
Guido van Rossum wrote: Since we already have the islice iterator, what's the point? I'd like to see iterators become as easy to work with as lists are. At the moment, anything that returns an iterator forces you to use the relatively cumbersome itertools.islice mechanism, rather than Python's na

[Python-Dev] 2.3 BRANCH FREEZE imminent!

2005-01-25 Thread Anthony Baxter
As those of you playing along at home with python-checkins would know, we're going to be cutting a 2.3.5c1 shortly (in about 12 hours time). Can people not in the set of the normal release team (you know the drill) please hold off on checkins to the branch from about UTC, 26th January (in

RE: [Python-Dev] Speed up function calls

2005-01-25 Thread Raymond Hettinger
> > In theory, I don't see how you could improve on METH_O and METH_NOARGS. > > The only saving is the time for the flag test (a predictable branch). > > Offsetting that savings is the additional time for checking min/max args > > and for constructing a C call with the appropriate number of args.