[issue36765] Invalid grammar for f_expression

2019-05-01 Thread Kasra Vand
Kasra Vand added the comment: Due to the discussion in following SO question https://stackoverflow.com/questions/55933956/what-does-a-star-asterisk-do-in-f-string/55934472#55933956 and the inconsistency of the source behaviour with the documentation I think using `"*&quo

[issue36765] Invalid grammar for f_expression

2019-05-01 Thread Kasra Vand
New submission from Kasra Vand : Due to the discussion in following SO question https://stackoverflow.com/questions/55933956/what-does-a-star-asterisk-do-in-f-string/55934472#55933956 and the inconsistency of the source behaviour with the documentation I think using `"*&quo

[issue33344] Use logical negation of integers directly in arithmatic propostions and equations

2018-04-24 Thread Kasra Vand
Change by Kasra Vand <kasraav...@gmail.com>: -- stage: -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <https://bugs.

[issue33344] Use logical negation of integers directly in arithmatic propostions and equations

2018-04-24 Thread Kasra Vand
Kasra Vand <kasraav...@gmail.com> added the comment: I think this will contradict to Python's operators precedence. What I mentioned seems like you're passing the number as an argument to `not`, and this is while `not` is not a function. There is an `operator.not_` function that does the

[issue33344] Use logical negation of integers directly in arithmatic propostions and equations

2018-04-24 Thread Kasra Vand
Kasra Vand <kasraav...@gmail.com> added the comment: Thanks, Indeed. But my question is more about the syntax and why it's not that straight? The reasons for that is because Python is known as a scientific programming language and many people come with mathematical background and may

[issue33344] Use logical negation of integers directly in arithmatic propostions and equations

2018-04-24 Thread Kasra Vand
Kasra Vand <kasraav...@gmail.com> added the comment: This may seem not very useful while except 0 for other numbers it returns False but one may want to use another proposition inside `not` that can use either 0 or a nonzero number. Also, in this case we can form more comprehensive l

[issue33344] Use logical negation of integers directly in arithmatic propostions and equations

2018-04-24 Thread Kasra Vand
New submission from Kasra Vand <kasraav...@gmail.com>: 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