rspec/rules/S1717/python/rule.adoc

31 lines
650 B
Plaintext
Raw Normal View History

2021-04-28 16:49:39 +02:00
Typically, backslashes are seen only as part of escape sequences. Therefore, the use of a backslash outside of a raw string or escape sequence looks suspiciously like a broken escape sequence.
Characters recognized as escape-able are: ``++abfnrtvox\'"++``
2021-04-28 16:49:39 +02:00
== Noncompliant Code Example
----
s = "Hello \world."
t = "Nice to \ meet you"
u = "Let's have \ lunch"
----
2021-04-28 16:49:39 +02:00
== Compliant Solution
----
s = "Hello world."
t = "Nice to \\ meet you"
u = r"Let's have \ lunch" // raw string
----
ifdef::env-github,rspecator-view[]
== Comments And Links
(visible only on this page)
include::comments-and-links.adoc[]
endif::env-github,rspecator-view[]