Mercurial > cpython-lru_cache-weakref
diff Python/import.c @ 23029:8291473fde3e legacy-trunk
Mass checkin of universal newline support.
Highlights: import and friends will understand any of \r, \n and \r\n
as end of line. Python file input will do the same if you use mode 'U'.
Everything can be disabled by configuring with --without-universal-newlines.
See PEP278 for details.
| author | Jack Jansen <jack.jansen@cwi.nl> |
|---|---|
| date | Sun, 14 Apr 2002 20:12:41 +0000 |
| parents | 4f9d5ea4f37d |
| children | e5242f58a5b6 |
line wrap: on
line diff
--- a/Python/import.c Sun Apr 14 10:30:51 2002 +0000 +++ b/Python/import.c Sun Apr 14 20:12:41 2002 +0000 @@ -81,15 +81,15 @@ #ifdef RISCOS static const struct filedescr _PyImport_StandardFiletab[] = { - {"/py", "r", PY_SOURCE}, + {"/py", "r" PY_STDIOTEXTMODE, PY_SOURCE}, {"/pyc", "rb", PY_COMPILED}, {0, 0} }; #else static const struct filedescr _PyImport_StandardFiletab[] = { - {".py", "r", PY_SOURCE}, + {".py", "r" PY_STDIOTEXTMODE, PY_SOURCE}, #ifdef MS_WIN32 - {".pyw", "r", PY_SOURCE}, + {".pyw", "r" PY_STDIOTEXTMODE, PY_SOURCE}, #endif {".pyc", "rb", PY_COMPILED}, {0, 0}
