Message243446
| Author |
terry.reedy |
| Recipients |
terry.reedy |
| Date |
2015年05月18日.01:19:46 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1431911987.88.0.560675260792.issue24222@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
C:\Users\Terry>py -2 -m idlelib.idle -c "print True"
>>>
*** Error in script or command!
Traceback (most recent call last):
File "<pyshell#0>", line 1
print True
^
SyntaxError: invalid syntax
https://stackoverflow.com/questions/30280525/python-idle-give-a-false-syntax-error
In answer, phihag points out that PyShell.py has future import and compiles with
code = compile(source, filename, "exec")
The fix is to add dont_inherit=True. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2015年05月18日 01:19:47 | terry.reedy | set | recipients:
+ terry.reedy |
| 2015年05月18日 01:19:47 | terry.reedy | set | messageid: <1431911987.88.0.560675260792.issue24222@psf.upfronthosting.co.za> |
| 2015年05月18日 01:19:47 | terry.reedy | link | issue24222 messages |
| 2015年05月18日 01:19:46 | terry.reedy | create |
|