classification
Title: This new feature or bug about operator "- -"?
Type: behavior Stage: resolved
Components: Windows Versions: Python 3.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: dai dai, paul.moore, rhettinger, steve.dower, tim.golden, zach.ware
Priority: normal Keywords:

Created on 2020-01-13 03:53 by dai dai, last changed 2020-01-13 04:45 by rhettinger. This issue is now closed.

Messages (2)
msg359886 - (view) Author: dai dai (dai dai) Date: 2020-01-13 03:53
```py
print(3 - - 2)
print(3 + + 2)
"""output
5
5
"""
```
msg359887 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2020-01-13 04:45
The interpreter parses those as:
 3 - (-2)
 3 + (+2)

The first is a binary operator and the second is a unary operator..
History
Date User Action Args
2020-01-13 04:45:20rhettingersetstatus: open -> closed

nosy: + rhettinger
messages: + msg359887

resolution: not a bug
stage: resolved
2020-01-13 03:53:01dai daicreate