[issue45456] operator 'pass' in 'if-else' linear expression

2021-10-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: Evgeniy, please leave this closed and take the proposal to the python-ideas mailing list. There is no further progress that can be made in this tracker issue. We can’t discern any part of your proposal that would make sense for improving the language.

[issue45456] operator 'pass' in 'if-else' linear expression

2021-10-13 Thread Evgeniy Ivanov
Evgeniy Ivanov added the comment: What about this? if x > 2: my_func(x) ok this code at 1 line, this code work, but... PEP 8: E701 multiple statements on one line (colon) Well f//k it with a pass Why not add an empty action operator? What is the problem? Such an instruction has existed si

[issue45456] operator 'pass' in 'if-else' linear expression

2021-10-13 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> not a bug status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing

[issue45456] operator 'pass' in 'if-else' linear expression

2021-10-12 Thread Steven D'Aprano
Steven D'Aprano added the comment: If you want pass to become an expression, what should these do? x = pass print(pass) mydict[pass] = 1 type(pass) There is nothing special about the ternary if operator. It is just an operator like plus, minus and more. The only difference

[issue45456] operator 'pass' in 'if-else' linear expression

2021-10-12 Thread Evgeniy Ivanov
Evgeniy Ivanov added the comment: formaly it's not bug, this is future request ok? -- ___ Python tracker ___ ___ Python-bugs-list m

[issue45456] operator 'pass' in 'if-else' linear expression

2021-10-12 Thread Evgeniy Ivanov
Evgeniy Ivanov added the comment: this wrong example now i'm use this x += x*2 if math.pow(x) > 386 else '' wanted to say that doing this now my_func(x) if x > 100 else '' -- ___ Python tracker __

[issue45456] operator 'pass' in 'if-else' linear expression

2021-10-12 Thread Evgeniy Ivanov
Evgeniy Ivanov added the comment: or another example: def my_func(x): something_do my_func(x) if x > 100 else -- ___ Python tracker ___ __

[issue45456] operator 'pass' in 'if-else' linear expression

2021-10-12 Thread Evgeniy Ivanov
Evgeniy Ivanov added the comment: it is more readable -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue45456] operator 'pass' in 'if-else' linear expression

2021-10-12 Thread Evgeniy Ivanov
Evgeniy Ivanov added the comment: ok, but what you say for this? x += x*2 if math.pow(x) > 386 else pass and if math.pow(x) > 386: x += x*2 1 line vs 2 line now i'm use this x += x*2 if math.pow(x) > 386 else '' -- ___ Python tracker

[issue45456] operator 'pass' in 'if-else' linear expression

2021-10-12 Thread Evgeniy Ivanov
Change by Evgeniy Ivanov : -- resolution: not a bug -> status: closed -> open type: compile error -> ___ Python tracker ___ ___ Py

[issue45456] operator 'pass' in 'if-else' linear expression

2021-10-12 Thread Steven D'Aprano
Steven D'Aprano added the comment: This is not a bug, "pass" is not an operator, it is not an expression, it is a statement and is only allowed in places where statements are allowed. The if expression requires all three operands to be expressions. Even if "pass" was permitted, what would it

[issue45456] operator 'pass' in 'if-else' linear expression

2021-10-12 Thread Evgeniy Ivanov
New submission from Evgeniy Ivanov : Why operator 'pass' not implement to 'if-else' linear expression? Construction ' if else pass' throws SyntaxError in Python 3.9 -- messages: 403793 nosy: evgnor86 priority: normal severity: normal status: open title: operator 'pass' in 'if-else' li