Message82134
| Author | pitrou |
|---|---|
| Recipients | alexandre.vassalotti, pitrou |
| Date | 2009-02-14.22:50:07 |
| SpamBayes Score | 2.2319182e-06 |
| Marked as misclassified | No |
| Message-id | <1234651808.93.0.485366406394.issue5266@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
Or, more precisely, it returns less than the requested number of
characters because characters are counted before translating newlines:
>>> f = io.StringIO("a\r\nb\r\n", newline=None)
>>> f.read(3)
'a\n'
TextIOWrapper gets it right:
>>> g = io.TextIOWrapper(io.BytesIO(b"a\r\nb\r\n"), newline=None)
>>> g.read(3)
'a\nb' |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2009-02-14 22:50:09 | pitrou | set | recipients: + pitrou, alexandre.vassalotti |
| 2009-02-14 22:50:08 | pitrou | set | messageid: <1234651808.93.0.485366406394.issue5266@psf.upfronthosting.co.za> |
| 2009-02-14 22:50:07 | pitrou | link | issue5266 messages |
| 2009-02-14 22:50:07 | pitrou | create | |