[Pythonmac-SIG] Re: [Python-Dev] Import hook to do end-of-line conversion?

Just van Rossum just@letterror.com
Sat, 7 Apr 2001 18:40:02 +0200


Greg Stein wrote:

> On Sat, Apr 07, 2001 at 06:25:52PM +0200, Fredrik Lundh wrote:
> > jack wrote:
> > > There's talk on the PythonMac-SIG to create an import hook that would
> > > read modules with either \r, \n or \r\n newlines and convert them to
> > > the local convention before feeding them to the rest of the import
> > > machinery.
> > 
> > why not fix the compiler instead?
> 
> Exactly. That is where the correct fix should go. The compile can/should
> recognize all types of newlines as the NEWLINE token.

The same goes for file objects in text mode...

Just