Message258614
| Author |
serhiy.storchaka |
| Recipients |
Zero, benjamin.peterson, docs@python, eryksun, fornax, pitrou, serhiy.storchaka, steve.dower, stutzbach, vstinner |
| Date |
2016年01月19日.18:04:26 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1453226666.56.0.308728032052.issue26158@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
This is not always possible. Consider following example:
>>> open('temp.txt', 'wb').write(b'+BDAEMQQyBDMENA-')
16
>>> f = open('temp.txt', 'r+', encoding='utf-7')
>>> f.read(2)
'аб'
What should be the result of truncating?
I think it would be better to not implement truncate() for text files at all. |
|