13 lines
300 B
Plaintext
13 lines
300 B
Plaintext
``++yield++`` and ``++return++`` only make sense in the context of functions. Using them outside a function raises a ``++SyntaxError++``. To break out of a loop, use ``++break++`` instead.
|
|
|
|
|
|
== Noncompliant Code Example
|
|
|
|
----
|
|
class MyClass:
|
|
while True:
|
|
return False #Noncompliant
|
|
----
|
|
|
|
|