15 lines
325 B
Plaintext
15 lines
325 B
Plaintext
== Noncompliant Code Example
|
|
|
|
[source,text]
|
|
----
|
|
try:
|
|
raise NotImplementedError()
|
|
except (NotImplementedError, RuntimeError): # Noncompliant. NotImplementedError inherits from RuntimeError
|
|
print("Foo")
|
|
|
|
try:
|
|
raise NotImplementedError()
|
|
except (RuntimeError, RuntimeError): # Noncompliant.
|
|
print("Foo")
|
|
----
|