[Python-3000] Lines breaking (original) (raw)
Greg Ewing greg.ewing at canterbury.ac.nz
Wed May 30 03:42:22 CEST 2007
- Previous message: [Python-3000] Lines breaking
- Next message: [Python-3000] BLists (PEP 3128)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Alexandre Vassalotti wrote:
I often see things like [line.strip() for line in open(file).readlines()],
If readline() stripped newlines, there would be no way to distinguish between an empty line and EOF.
-- Greg
- Previous message: [Python-3000] Lines breaking
- Next message: [Python-3000] BLists (PEP 3128)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]