mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
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.
This commit is contained in:
parent
dcd2dc2fff
commit
7b8c7546eb
15 changed files with 390 additions and 35 deletions
|
@ -81,15 +81,15 @@ struct filedescr * _PyImport_Filetab = NULL;
|
|||
|
||||
#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}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue