Message367875
In Python3.8 and prior, you can type this in a shell session
------------------------------------------------------------
Python 3.8.2 (v3.8.2:7b3ab5921f, Feb 24 2020, 17:52:18)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license()" for more information.
>>> def square(x):
s = x ** 2
return s
In Python3.9, the input is terminated prematurely
-------------------------------------------------
Python 3.9.0a6 (v3.9.0a6:bc1c8af8ef, Apr 27 2020, 17:05:28)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license()" for more information.
>>> def square(x):
s = x ** 2 # <-- On first return, the statement evaluates
>>>
>>> square(5)
25 |
|
Date |
User |
Action |
Args |
2020-05-01 19:35:30 | rhettinger | set | recipients:
+ rhettinger, terry.reedy |
2020-05-01 19:35:30 | rhettinger | set | messageid: <1588361730.23.0.0107658134744.issue40472@roundup.psfhosted.org> |
2020-05-01 19:35:30 | rhettinger | link | issue40472 messages |
2020-05-01 19:35:30 | rhettinger | create | |
|