2021-06-03 09:05:38 +02:00
|
|
|
=== on 14 Apr 2020, 09:49:58 Pierre-Yves Nicolas wrote:
|
2021-06-02 20:44:38 +02:00
|
|
|
I would expect the compliant solution to suggest something like:
|
|
|
|
|
|
|
|
----
|
|
|
|
for i in range(50):
|
|
|
|
if i == 42:
|
|
|
|
print('Magic number in range')
|
|
|
|
print('Magic number not found')
|
|
|
|
----
|
|
|
|
That behaves the same way as the noncompliant example but it doesn't contain the suspicious `else`.
|
|
|
|
|