Message168139
| Author |
asvetlov |
| Recipients |
asvetlov, chris.jerdonek, pitrou |
| Date |
2012年08月13日.19:55:45 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1344887746.2.0.0183493941939.issue15592@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
I like to accept both str and bytes if universal_newlines is False and raise explicit exception for bytes if universal_newlines is True.
Looks like universal_newlines for bytes doesn't make sense, also we prefer to use str everywhere. Bytes should be used if it is really byte-stream or if unicode cannot be passed by some limitations of underlying OS etc.
There are couple dark corners:
1. What to do if stdin doesn't have `encoding` attribute? Convert to bytes using filesystemencoding? Raise explicit exception? Adding `encode` parameter for .communicate doesn't looks elegant.
2. How .communicate works on Windows? I see completely different implementation of this method for win32.
I need some time to investigate before publish proposal to python-dev list. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年08月13日 19:55:46 | asvetlov | set | recipients:
+ asvetlov, pitrou, chris.jerdonek |
| 2012年08月13日 19:55:46 | asvetlov | set | messageid: <1344887746.2.0.0183493941939.issue15592@psf.upfronthosting.co.za> |
| 2012年08月13日 19:55:45 | asvetlov | link | issue15592 messages |
| 2012年08月13日 19:55:45 | asvetlov | create |
|