mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +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
|
@ -44,7 +44,7 @@ def compile(file, cfile=None, dfile=None):
|
|||
|
||||
"""
|
||||
import os, marshal, __builtin__
|
||||
f = open(file)
|
||||
f = open(file, 'U')
|
||||
try:
|
||||
timestamp = long(os.fstat(f.fileno())[8])
|
||||
except AttributeError:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue