Message258879
Here is the user interaction:
```python
$ python3
Python 3.5.1 (default, Dec 7 2015, 21:59:10)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.1.76)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> def oh_hai():
... await something()
File "<stdin>", line 2
await something()
^
SyntaxError: invalid syntax
```
It would be helpful if Python could tell the user something more specific about _why_ the syntax is invalid. Is that possible?
For example, in the case above, an error message along the following lines would be much more helpful:
```
SyntaxError: Cannot call `await` inside non-`async` method.
```
Without a hint like this, it's too easy to miss the obvious and waste time eye-balling the code, like I did. :-) |
|
| Date |
User |
Action |
Args |
| 2016-01-24 02:06:03 | nchammas | set | recipients:
+ nchammas |
| 2016-01-24 02:06:03 | nchammas | set | messageid: <1453601163.58.0.356009781594.issue26188@psf.upfronthosting.co.za> |
| 2016-01-24 02:06:03 | nchammas | link | issue26188 messages |
| 2016-01-24 02:06:01 | nchammas | create | |
|