Re: [Python-Dev] IO implementation: in C and Python?

2009-02-19 Thread Alexandre Vassalotti
On Fri, Feb 20, 2009 at 12:35 AM, Steven D'Aprano wrote: > > Currently, if I want to verify that (say) cFoo and Foo do the same thing, or > compare their speed, it's easy because I can import the modules separately. > Given the 3.0 approach, how would one access the Python versions without > black

Re: [Python-Dev] IO implementation: in C and Python?

2009-02-19 Thread Brett Cannon
On Thu, Feb 19, 2009 at 21:35, Steven D'Aprano wrote: > Guido van Rossum wrote: > >> On Thu, Feb 19, 2009 at 8:38 PM, Brett Cannon wrote: >> >>> On Thu, Feb 19, 2009 at 19:41, Benjamin Peterson >>> wrote: >>> As we prepare to merge the io-c branch, the question has come up [1] about t

Re: [Python-Dev] IO implementation: in C and Python?

2009-02-19 Thread Steven D'Aprano
Guido van Rossum wrote: On Thu, Feb 19, 2009 at 8:38 PM, Brett Cannon wrote: On Thu, Feb 19, 2009 at 19:41, Benjamin Peterson wrote: As we prepare to merge the io-c branch, the question has come up [1] about the original Python implementation. Should it just be deleted in favor C version? The

Re: [Python-Dev] IO implementation: in C and Python?

2009-02-19 Thread Collin Winter
On Thu, Feb 19, 2009 at 9:07 PM, Guido van Rossum wrote: > On Thu, Feb 19, 2009 at 8:38 PM, Brett Cannon wrote: >> On Thu, Feb 19, 2009 at 19:41, Benjamin Peterson >> wrote: >>> As we prepare to merge the io-c branch, the question has come up [1] >>> about the original Python implementation. Sho

Re: [Python-Dev] IO implementation: in C and Python?

2009-02-19 Thread Guido van Rossum
On Thu, Feb 19, 2009 at 8:38 PM, Brett Cannon wrote: > On Thu, Feb 19, 2009 at 19:41, Benjamin Peterson > wrote: >> As we prepare to merge the io-c branch, the question has come up [1] >> about the original Python implementation. Should it just be deleted in >> favor C version? The wish to mainta

Re: [Python-Dev] A suggestion: Do proto-PEPs in Google Docs

2009-02-19 Thread Collin Winter
On Thu, Feb 19, 2009 at 7:17 PM, Stephen J. Turnbull wrote: > On Python-Ideas, Guido van Rossum writes: > > > On Thu, Feb 19, 2009 at 2:12 AM, Greg Ewing wrote: > > > > Fifth draft of the PEP. Re-worded a few things slightly > > > to hopefully make the proposal a bit clearer up front. > > > >

Re: [Python-Dev] IO implementation: in C and Python?

2009-02-19 Thread Brett Cannon
On Thu, Feb 19, 2009 at 19:41, Benjamin Peterson wrote: > As we prepare to merge the io-c branch, the question has come up [1] > about the original Python implementation. Should it just be deleted in > favor C version? The wish to maintain the two implementations together > has been raised on the

Re: [Python-Dev] IO implementation: in C and Python?

2009-02-19 Thread rdmurray
On Thu, 19 Feb 2009 at 21:41, Benjamin Peterson wrote: As we prepare to merge the io-c branch, the question has come up [1] about the original Python implementation. Should it just be deleted in favor C version? The wish to maintain the two implementations together has been raised on the basis th

[Python-Dev] IO implementation: in C and Python?

2009-02-19 Thread Benjamin Peterson
As we prepare to merge the io-c branch, the question has come up [1] about the original Python implementation. Should it just be deleted in favor C version? The wish to maintain the two implementations together has been raised on the basis that Python is easier to experiment on and read (for other

[Python-Dev] A suggestion: Do proto-PEPs in Google Docs

2009-02-19 Thread Stephen J. Turnbull
[Aside to Guido: Oops, I think I accidentally sent you a contentless reply. Sorry!] As a suggestion, I think this is relevant to everybody who might be writing a PEP, so I'm cross-posting to Python-Dev. Probably no discussion is needed, but Reply-To is set to Python-Ideas. On Python-Ideas, Guid

Re: [Python-Dev] lifting of prohibition against readlines inside a "for line in file" in Py3?

2009-02-19 Thread Antoine Pitrou
Hello, bitdance.com> writes: > > Since the 'pipe' comment is an XXX, it is not clear that my use case > is covered. However, the actual implementation of readinto seems to > only call 'read' once, so as long as the 'read' of the subclass returns > whatever bytes are available, then it looks go

Re: [Python-Dev] lifting of prohibition against readlines inside a "for line in file" in Py3?

2009-02-19 Thread rdmurray
On Wed, 18 Feb 2009 at 20:31, Guido van Rossum wrote: On Wed, Feb 18, 2009 at 6:38 PM, wrote: On Wed, 18 Feb 2009 at 21:25, Antoine Pitrou wrote: Nick Coghlan gmail.com> writes: I *think* the 2.x system had an internal buffer that was used by the file iterator, but not by the file methods

Re: [Python-Dev] Peephole Optimization

2009-02-19 Thread Raymond Hettinger
[Venkatraman S] the following line kind of confuses me and wasnt sure what exactly Raymond(et al) is planning, I think the AST optimization work is being pursued by tlee. See his current results on the branch: tlee-ast-optimize/ I don't know if this work has stalled but it was off to a good

Re: [Python-Dev] Peephole Optimization

2009-02-19 Thread Olemis Lang
On Thu, Feb 19, 2009 at 8:53 AM, Venkatraman S wrote: > Hi, Hi ... > > If there are some optimizations that can be done in the bytecodes, then > 'where' would be > the suggested place to incorporate the same; The way I modify function's bytecode now (... but I am open to further suggestions ...

[Python-Dev] Peephole Optimization

2009-02-19 Thread Venkatraman S
Hi, I was looking around possibilities of bytecode optimizations in cpython and was looking at some older bugs. One of them being issue#2499; the following line kind of confuses me and wasnt sure what exactly Raymond(et al) is planning, as i presume that bytecode

Re: [Python-Dev] lifting of prohibition against readlines inside a "for line in file" in Py3?

2009-02-19 Thread Nick Coghlan
Terry Reedy wrote: > I suspect your original query got lost in the shuffle. If you do not > get an answer this time, file an issue on the tracker bugs.python.org > but do not select whether it is a behavior or doc issue. At least, it > will stay open until resolved. Filing a tracker issue is prob