45 lines
678 B
Plaintext
45 lines
678 B
Plaintext
== Why is this an issue?
|
|
|
|
The ``++raise a, b++`` syntax is deprecated in Python 3, and should no longer be used.
|
|
|
|
|
|
=== Noncompliant code example
|
|
|
|
[source,python]
|
|
----
|
|
try:
|
|
if not is_okay:
|
|
raise Exception, 'It\'s not okay' # Noncompliant
|
|
except Exception as e:
|
|
# ...
|
|
----
|
|
|
|
|
|
=== Compliant solution
|
|
|
|
[source,python]
|
|
----
|
|
try:
|
|
if not is_okay:
|
|
raise Exception('It\'s not okay')
|
|
except Exception as e:
|
|
# ...
|
|
----
|
|
|
|
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
include::message.adoc[]
|
|
|
|
'''
|
|
== Comments And Links
|
|
(visible only on this page)
|
|
|
|
include::comments-and-links.adoc[]
|
|
endif::env-github,rspecator-view[]
|