rspec/rules/S2317/python/rule.adoc

17 lines
324 B
Plaintext
Raw Normal View History

2021-04-28 16:49:39 +02:00
Use of the ``++exec++`` statement could be dangerous, and should be avoided. Moreover, the ``++exec++`` statement was removed in Python 3.0. Instead, the built-in ``++exec()++`` function can be used.
2021-04-28 16:49:39 +02:00
== Noncompliant Code Example
----
exec 'print 1' # Noncompliant
----
2021-04-28 16:49:39 +02:00
== Compliant Solution
----
exec('print 1')
----