Re:The PEPs of Python 3.9
by TkTech on Thursday May 28, 2020 @04:41PM
(#23342276)
That's still "using" the resulting value for a comparison. CPython isn't an optimizing compiler, or it would completely remove the call to upper().
Notice in the first example, right after CALL_METHOD the return value on the stack is just immediately POP'd away. The parent is saying that when you run `python example.py` CPython should see that the return value is never used and emit a warning. This would only happen because `upper()` was manually marked using the suggested `must_use` annotation.
[ Parent
| on HN ]
There are no comments on this comment yet.