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

2009-02-20 Thread Antoine Pitrou
Benjamin Peterson benjamin at python.org writes: 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

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

2009-02-20 Thread Georg Brandl
Antoine Pitrou schrieb: Benjamin Peterson benjamin at python.org writes: 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

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

2009-02-20 Thread Antoine Pitrou
Georg Brandl g.brandl at gmx.net writes: I just hope everyone updates both versions when making changes to IO. My proposal is just organizational, it is neutral in terms of whether or not the Python version is correctly maintained. We can hope that the IO lib *semantics* won't change too much

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

2009-02-20 Thread Michael Foord
Antoine Pitrou wrote: Georg Brandl g.brandl at gmx.net writes: I just hope everyone updates both versions when making changes to IO. My proposal is just organizational, it is neutral in terms of whether or not the Python version is correctly maintained. We can hope that the IO lib

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

2009-02-20 Thread Lie Ryan
On Thu, 19 Feb 2009 21:41:51 -0600, 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

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

2009-02-20 Thread Guido van Rossum
On Fri, Feb 20, 2009 at 4:01 AM, Antoine Pitrou solip...@pitrou.net wrote: Georg Brandl g.brandl at gmx.net writes: I just hope everyone updates both versions when making changes to IO. My proposal is just organizational, it is neutral in terms of whether or not the Python version is

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

2009-02-20 Thread Antoine Pitrou
Guido van Rossum guido at python.org writes: I worry that with your proposal people are once again going to import the pure Python version where they shouldn't. Maybe _pyio.py would work though? I'm ok with _pyio.py. Hoping that modules won't evolve is futile. The concern for divergence

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

2009-02-20 Thread Terry Reedy
Guido van Rossum wrote: On Fri, Feb 20, 2009 at 4:01 AM, Antoine Pitrou solip...@pitrou.net wrote: Georg Brandl g.brandl at gmx.net writes: I just hope everyone updates both versions when making changes to IO. My proposal is just organizational, it is neutral in terms of whether or not the

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

2009-02-20 Thread Greg Ewing
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. Also, won't foo.py be wasting time in most cases by defining python versions that get overwritten? Instead of

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

2009-02-20 Thread Brett Cannon
On Fri, Feb 20, 2009 at 13:15, Greg Ewing greg.ew...@canterbury.ac.nzwrote: 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. Also, won't foo.py be wasting time

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

2009-02-20 Thread Steven D'Aprano
Greg Ewing wrote: Instead of defining things directly in foo.py, maybe it should do try: from cFoo import * except ImportError: from pyFoo import * Then the fast path will be taken if cFoo is available, and you can directly import cFoo or pyFoo if you want. For what it's worth,

[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

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

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 benja...@python.orgwrote: 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

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 br...@python.org wrote: On Thu, Feb 19, 2009 at 19:41, Benjamin Peterson benja...@python.org 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

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 gu...@python.org wrote: On Thu, Feb 19, 2009 at 8:38 PM, Brett Cannon br...@python.org wrote: On Thu, Feb 19, 2009 at 19:41, Benjamin Peterson benja...@python.org wrote: As we prepare to merge the io-c branch, the question has come up [1]

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 br...@python.org wrote: On Thu, Feb 19, 2009 at 19:41, Benjamin Peterson benja...@python.org wrote: As we prepare to merge the io-c branch, the question has come up [1] about the original Python implementation. Should it

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 st...@pearwood.info wrote: Guido van Rossum wrote: On Thu, Feb 19, 2009 at 8:38 PM, Brett Cannon br...@python.org wrote: On Thu, Feb 19, 2009 at 19:41, Benjamin Peterson benja...@python.org wrote: As we prepare to merge the io-c branch, the

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 st...@pearwood.info 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