rspec/rules/S5868/python/rule.adoc

20 lines
315 B
Plaintext

== Why is this an issue?
include::../description.adoc[]
=== Noncompliant code example
[source,python]
----
re.sub(r"[c̈d̈]", "X", "cc̈d̈d") # Noncompliant, print "XXXXXX" instead of expected "cXXd".
----
=== Compliant solution
[source,python]
----
re.sub(r"c̈|d̈", "X", "cc̈d̈d") # print "cXXd"
----