Extending FileList with CrLf

Richard A. O'Keefe ok at cs.otago.ac.nz
Mon Aug 4 00:35:45 UTC 2003


Daniel Vainsencher <danielv at netvision.net.il> quoted
mention of the Python PEP for "Universal Newline Support" but wrote:

	Note that they implemented the library so it requires an explicit
	parameter for it to enter "universal" mode. That is exactly what I'm
	proposing we do. This is not what CLFS does.
	
Note also what the PEP says in the very next paragraph:
    Universal newline support is also used when importing modules and
    when executing a file with the execfile() function.  This means that
    Python modules can be shared between all three operating systems without
    needing to convert the line-endings.

It's also worth reading the rational in the actual PEP itself.
There are basically two problems:
(1) backwards compatibility (not something Squeak is known for, so not an
    issue in this mailing list)
(2) the low-level code in Python wasn't defined with this in mind, so there
    is too much code that does writing to C FILE* and cannot therefore be
    told to use "u" convention; this means that they can't figure out how
    to do "wu".  This again is NOT a problem that Squeak faces.
In short, none of the reasons for Python having "ru" explicit and no
"r+u" or "au" or "wu" seem to apply to Squeak; we are free to do the
right thing.

One clear emphasis in the Python PEP is that they would like to have
Python source code in a file system that can be mounted by operating
systems with differeng end-of-line conventions and just have it work;
the analogue for Squeak would at a minimum be having change sets "just
work" whatever their end of line convention.

Is it possible to reach agreement that change sets should "just work"
no matter what end of line convention they use?  This question can be
separated from the issue of what happens when programmers open files
themselves.



More information about the Squeak-dev mailing list