Message315688
Logical Negation of integers in Python always returns a Boolean result which can be achieve using `not`. Sometimes it's necessary to use this result directly in a proposition within a list comprehension (mostly). But if we use `not` directly in such arithmatic proposition it will raise a `SyntaxError.
```
In [46]: 3 + not(4)
File "<ipython-input-46-e87dc6b7d800>", line 1
3 + not(4)
^
SyntaxError: invalid syntax
```
Isn't that possible to make this work for integers in future releases? I was more curious to know what would be the drawbacks of such feature if there are any? |
|
Date |
User |
Action |
Args |
2018-04-24 07:31:12 | Kasra Vand | set | recipients:
+ Kasra Vand |
2018-04-24 07:31:12 | Kasra Vand | set | messageid: <1524555072.69.0.682650639539.issue33344@psf.upfronthosting.co.za> |
2018-04-24 07:31:12 | Kasra Vand | link | issue33344 messages |
2018-04-24 07:31:12 | Kasra Vand | create | |
|