New submission from Kasra Vand <[email protected]>:
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?
----------
components: Interpreter Core
messages: 315688
nosy: Kasra Vand
priority: normal
severity: normal
status: open
title: Use logical negation of integers directly in arithmatic propostions and
equations
type: behavior
versions: Python 3.7
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue33344>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com