Message264906
| Author |
serhiy.storchaka |
| Recipients |
Alex.Willmer, python-dev, serhiy.storchaka, xdegaye |
| Date |
2016年05月05日.12:40:02 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1462452002.32.0.96838623763.issue26918@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
The equivalent of used "tr" command is .upper(), not .swapcase().
Instead of the loop
for s in sys.stdin.read(): sys.stdout.write(s.upper())
you can write just
sys.stdout.write(sys.stdin.read().upper())
But actually the loop is needed for testing purpose.
while True:
b = sys.stdin.buffer.read(1)
if not b:
break
sys.stdout.buffer.write(b.upper())
And sys.executable should be escaped for the case of spaces or other special symbols in the path.
All this complicates tests too much. I prefer to skip some tests on Android. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2016年05月05日 12:40:02 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, xdegaye, python-dev, Alex.Willmer |
| 2016年05月05日 12:40:02 | serhiy.storchaka | set | messageid: <1462452002.32.0.96838623763.issue26918@psf.upfronthosting.co.za> |
| 2016年05月05日 12:40:02 | serhiy.storchaka | link | issue26918 messages |
| 2016年05月05日 12:40:02 | serhiy.storchaka | create |
|