Re: [Python-Dev] Lack of sequential decompression in the zipfile module

2007-02-16 Thread Michele Simionato
Derek Shockey gmail.com> writes: > > Though I am an avid Python programmer, I've never forayed into the area of developing Python itself, so I'm not exactly sure how all this works.I was confused (and somewhat disturbed) to discover recently that the zipfile module offers only one-shot decompres

Re: [Python-Dev] Twisted Isn't Specific (was Re: Trial balloon: microthreads library in stdlib)

2007-02-16 Thread glyph
On 16 Feb, 06:30 pm, [EMAIL PROTECTED] wrote: >I suggest it is possible to implement a PerfectReactor. I don't think this constitutes a sufficient existence proof. Perhaps you could write a prototype? There are a bunch of existing reactors you could either import or copy/paste from to bootst

Re: [Python-Dev] Recent experience with the _ast module

2007-02-16 Thread Collin Winter
On 2/16/07, Brett Cannon <[EMAIL PROTECTED]> wrote: > On 2/16/07, Collin Winter <[EMAIL PROTECTED]> wrote: > > On 2/14/07, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > > Collin Winter schrieb: > > > > What's inconsistent about it? That classes are being used for the > > > > _ast.{Add,Sub,Mult,e

Re: [Python-Dev] Recent experience with the _ast module

2007-02-16 Thread Brett Cannon
On 2/16/07, Collin Winter <[EMAIL PROTECTED]> wrote: > On 2/14/07, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > Collin Winter schrieb: > > > What's inconsistent about it? That classes are being used for the > > > _ast.{Add,Sub,Mult,etc} names? > > > > Exactly. These aren't names - they are node

Re: [Python-Dev] Recent experience with the _ast module

2007-02-16 Thread Collin Winter
On 2/14/07, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > Collin Winter schrieb: > > What's inconsistent about it? That classes are being used for the > > _ast.{Add,Sub,Mult,etc} names? > > Exactly. These aren't names - they are nodes in the tree. All nodes > are instances of _ast.AST. > > > I don

Re: [Python-Dev] Py2.6 ideas

2007-02-16 Thread Josiah Carlson
"Raymond Hettinger" <[EMAIL PROTECTED]> wrote: > > Raymond Hettinger schrieb: > >> d, g, v, t, r = model(somecontract) > > [MvL] > > I find that line quite unreadable > > Of course, I can't give you the fully spelled-out line from proprietary code. > But at this point we're just talking about t

Re: [Python-Dev] Py2.6 ideas

2007-02-16 Thread Raymond Hettinger
> Raymond Hettinger schrieb: >> d, g, v, t, r = model(somecontract) [MvL] > I find that line quite unreadable Of course, I can't give you the fully spelled-out line from proprietary code. But at this point we're just talking about the use cases for tuples with or without named attributes. Some

Re: [Python-Dev] Lack of sequential decompression in the zipfile module

2007-02-16 Thread Martin v. Löwis
Derek Shockey schrieb: > Since I was writing a script to work with potentially very large zipped > files, I took it upon myself to write an extract() method for zipfile, > which is essentially an adaption of the read() method modeled after > tarfile's extract(). I feel that this is something tha

Re: [Python-Dev] Alternative Python VM

2007-02-16 Thread Brett Cannon
On 2/14/07, Sokolov Yura <[EMAIL PROTECTED]> wrote: > It could be interesting. > > """ > - pyvm is * 2 times * faster than Python 2.4. In the source code there > is a collection of benchmarks which includes 65 python scripts collected > from the internet. At average if Python 2.4 needs 24 hours t

[Python-Dev] Porting Python 2.4.4. and 2.5 to Sparc Solaris 9 and 10

2007-02-16 Thread vancleef
Dear Python Developers. I posted the following to the python-help yesterday. While I received some interesting responses, they indicated that I'd already gone beyond that group's knowledge, and suggested that I mail the developers directly on this list. By way of background, I'm a retired hardw

Re: [Python-Dev] New syntax for 'dynamic' attribute access

2007-02-16 Thread Sergio Correia
A few of you have expressed concern about how would that look to a newbie. Being one, this is what I think: - The idea sounds good. Setattr and getattr seems both unpythonic and illegible. - please.(dont_torture) = me(with_dots,that_look,like.(function),calls). Ok, so the dot _is_ needed in order

Re: [Python-Dev] New syntax for 'dynamic' attribute access

2007-02-16 Thread Tristan Seligmann
* Ben North <[EMAIL PROTECTED]> [2007-02-11 23:45:05 +]: > Dynamic attribute access is currently possible using the "getattr" > and "setattr" builtins. The present PEP suggests a new syntax to > make such access easier, allowing the coder for example to write > > x.('foo_

Re: [Python-Dev] Twisted Isn't Specific (was Re: Trial balloon: microthreads library in stdlib)

2007-02-16 Thread Joachim König-Baltes
[EMAIL PROTECTED] wrote: > When you boil it down, Twisted's event loop is just a notification for > "a connection was made", "some data was received on a connection", "a > connection was closed", and a few APIs to listen or initiate different > kinds of connections, start timed calls, and commu

[Python-Dev] Alternative Python VM

2007-02-16 Thread Sokolov Yura
It could be interesting. """ - pyvm is * 2 times * faster than Python 2.4. In the source code there is a collection of benchmarks which includes 65 python scripts collected from the internet. At average if Python 2.4 needs 24 hours to do some job, pyvm can do it in 12 hours. - pyvm is a vir

Re: [Python-Dev] Py2.6 ideas

2007-02-16 Thread Martin v. Löwis
Raymond Hettinger schrieb: > d, g, v, t, r = model(somecontract) I find that line quite unreadable, and find it likely that I would not be able to remember the standard order of the fields. You almost "had me" with the two fields example, but this makes me think "-1" again. Is it really that you

Re: [Python-Dev] Py2.6 ideas

2007-02-16 Thread Andrew Koenig
> Maybe Raymond's proposed record type should have two versions: one > that's also a tuple, for compatibility, and one that's just a record. FWIW, ML unifies tuples and records by defining a tuple to be a record whose component names are all consecutive integers starting with 1. For example, in M

Re: [Python-Dev] Lack of sequential decompression in the zipfile module

2007-02-16 Thread Brett Cannon
On 2/16/07, Derek Shockey <[EMAIL PROTECTED]> wrote: > Though I am an avid Python programmer, I've never forayed into the area of > developing Python itself, so I'm not exactly sure how all this works. > > I was confused (and somewhat disturbed) to discover recently that the > zipfile module offers

Re: [Python-Dev] urllib2 EP + decr. startup time

2007-02-16 Thread Paul Moore
On 16/02/07, Phillip J. Eby <[EMAIL PROTECTED]> wrote: > Hm. Interesting, actually. Does anybody know why it's looking for > 'C:\\WINDOWS\\system32\\python25.zip'? That seems wrong to me. It looks alongside python25.dll, which is installed in windows\system32 by default. If you then ask why th

[Python-Dev] Lack of sequential decompression in the zipfile module

2007-02-16 Thread Derek Shockey
Though I am an avid Python programmer, I've never forayed into the area of developing Python itself, so I'm not exactly sure how all this works. I was confused (and somewhat disturbed) to discover recently that the zipfile module offers only one-shot decompression of files, accessible only via th

Re: [Python-Dev] Py2.6 ideas

2007-02-16 Thread Raymond Hettinger
[Martin v. Löwis] >Why does this still need to support the > tuple interface (i.e. indexed access)? I used named tuples whereever I need a tuple but the number and meaning of the fields starts to tax my memory. For doctests, I return a named tuple like TestResults(failed=0, attempted=15). That n

Re: [Python-Dev] Twisted Isn't Specific (was Re: Trial balloon: microthreads library in stdlib)

2007-02-16 Thread Larry Hastings
> As others have reported: if you have a gtk reactor and a wx reactor to > support, in addition to a "regular" Win32 reactor (e.g. PythonWin), > your approach still won't work. They all do GetMessage behind the > scenes (sp?), yet you would run them in multiple threads, so they get > their own

Re: [Python-Dev] Py2.6 ideas

2007-02-16 Thread Guido van Rossum
On 2/16/07, Nick Coghlan <[EMAIL PROTECTED]> wrote: > Martin v. Löwis wrote: > > Raymond Hettinger schrieb: > >> No need to go so widely off-track. The idea is to have an efficient type > >> that > >> is directly substitutable for tuples but is a bit more self-descriptive. > >> I like > >> to h

Re: [Python-Dev] urllib2 EP + decr. startup time

2007-02-16 Thread Phillip J. Eby
At 07:29 PM 2/16/2007 +0200, KoDer wrote: >2007/2/16, Phillip J. Eby <[EMAIL PROTECTED]>: > > At 04:38 PM 2/16/2007 +0200, KoDer wrote: >. > > > > > > Also, are you aware that putting a zipped version of the standard library > > on sys.path already speeds up startup considerably? Python since

Re: [Python-Dev] urllib2 EP + decr. startup time

2007-02-16 Thread KoDer
2007/2/16, Phillip J. Eby <[EMAIL PROTECTED]>: > At 04:38 PM 2/16/2007 +0200, KoDer wrote: . > > > Also, are you aware that putting a zipped version of the standard library > on sys.path already speeds up startup considerably? Python since 2.3 > automatically includes an appropriate entry in s

Re: [Python-Dev] urllib2 EP + decr. startup time

2007-02-16 Thread Phillip J. Eby
At 04:38 PM 2/16/2007 +0200, KoDer wrote: >'strace' command shows next: most of startup time the interpreter >try to find imported modules. >And most of them finished with 'not found' error, because of large >size of sys.path variable. >In future this time will be increase - setuptools

Re: [Python-Dev] Py2.6 ideas

2007-02-16 Thread Phillip J. Eby
At 01:38 PM 2/16/2007 +0100, Martin v. Löwis wrote: >Nick Coghlan schrieb: > > However, another aspect that occurred to me is that inheriting from > > tuple has significant practical benefits in terms of speed and memory > > consumption, at which point it doesn't seem worthwhile to *remove* the > >

[Python-Dev] urllib2 EP + decr. startup time

2007-02-16 Thread KoDer
Hello to all. During more than two years i widely use urllib2 to write commercial applications (almost for extracting data from web sites to excel sheets) and here is some enhanced enhanced for it: 1) Add support for 'HEAD' request (and maybe some other). This needs small changes. a)Add reques

Re: [Python-Dev] New syntax for 'dynamic' attribute access

2007-02-16 Thread Oleg Broytmann
On Fri, Feb 16, 2007 at 01:42:54PM +0100, "Martin v. L?wis" wrote: > Ah, this passive voice again, and again the assumption that there is an > agenda of python-dev. Exactly opposite. There is no agenda, and thus there is no pojnt in trying to prevent new features in Python language based on the

Re: [Python-Dev] New syntax for 'dynamic' attribute access

2007-02-16 Thread Martin v. Löwis
Oleg Broytmann schrieb: >That changes the meaning, but... have you ever tried to ride a horse > designed by a group of Clever Individuals loosely connected by email? ;) I > am afraid of even thinking of its ugliness and speed. (-: >I think a committee is better than nothing, and I believe C

Re: [Python-Dev] Py2.6 ideas

2007-02-16 Thread Martin v. Löwis
Nick Coghlan schrieb: > However, another aspect that occurred to me is that inheriting from > tuple has significant practical benefits in terms of speed and memory > consumption, at which point it doesn't seem worthwhile to *remove* the > indexing capability. I'm not so sure that inheriting fro

Re: [Python-Dev] New syntax for 'dynamic' attribute access

2007-02-16 Thread Eduardo \"EdCrypt\" O. Padoan
>I think a committee is better than nothing, and I believe CP4E has > been dropped from the agenda. The general CP4E idea is part of the "General Pythonic Ideal", whatever it may be :P -- EduardoOPadoan (eopadoan->altavix::com) Bookmarks: http://del.icio.us/edcrypt ___

Re: [Python-Dev] [Python-3000] UserDict revamp

2007-02-16 Thread Eduardo \"EdCrypt\" O. Padoan
[Steve] > No complaints here. Not that you need my permission of course. ;-) Same here, obviously. [Raymond] > Thanks, I had already started working on this one. > Of course, everyone is welcome to contribute. Ok, you can count on that. -- EduardoOPadoan (eopadoan->altavix::com) Bookmarks: htt

Re: [Python-Dev] Py2.6 ideas

2007-02-16 Thread Nick Coghlan
Martin v. Löwis wrote: > Nick Coghlan schrieb: >>> I'd like to repeat Guido's question: Why does this still need to >>> support the tuple interface (i.e. indexed access)? >> >> So that it remains interoperable with existing libraries that expect a >> tuple? Otherwise you'd be casting (and copying

Re: [Python-Dev] Py2.6 ideas

2007-02-16 Thread Martin v. Löwis
Nick Coghlan schrieb: >> I'd like to repeat Guido's question: Why does this still need to >> support the tuple interface (i.e. indexed access)? > > So that it remains interoperable with existing libraries that expect a > tuple? Otherwise you'd be casting (and copying) every time you needed to >

Re: [Python-Dev] New syntax for 'dynamic' attribute access

2007-02-16 Thread Oleg Broytmann
On Fri, Feb 16, 2007 at 12:40:54PM +1300, Greg Ewing wrote: > The quote is actually "a camel is a *racehorse* designed by a committee". > Camels are very good at surviving in the desert, but not so good at > winning a horse race (not camel race). Which is the point of the saying. That changes t

Re: [Python-Dev] generic async io (was: microthreading vs. async io)

2007-02-16 Thread Nick Maclaren
Greg Ewing <[EMAIL PROTECTED]> wrote: > > > An I/O operation passes a buffer, length, file and action and receives a > > token back. > > You seem to be using the word "threading" in a completely > different way than usual here, which may be causing some > confusion. Not really, though I may have

Re: [Python-Dev] Py2.6 ideas

2007-02-16 Thread Nick Coghlan
Martin v. Löwis wrote: > Raymond Hettinger schrieb: >> No need to go so widely off-track. The idea is to have an efficient type >> that >> is directly substitutable for tuples but is a bit more self-descriptive. I >> like >> to have the doctest result cast at NamedTuple('TestResults failed >