
Inline adoc files when they are included exactly once. Also fix language tags because this inlining gives us better information on what language the code is written in.
48 lines
843 B
Plaintext
48 lines
843 B
Plaintext
== Why is this an issue?
|
|
|
|
Python interprets ``++False++`` as a "false" boolean value, and ``++True++`` as a "true" boolean value. Assigning them other values could lead to unexpected behaviors.
|
|
|
|
|
|
This rule raises an issue when "True" and "False", with any case, are used as identifiers.
|
|
|
|
|
|
=== Noncompliant code example
|
|
|
|
[source,python]
|
|
----
|
|
True = "red" # Noncompliant
|
|
----
|
|
|
|
|
|
=== Compliant solution
|
|
|
|
[source,python]
|
|
----
|
|
color = "red" # Noncompliant
|
|
----
|
|
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
=== Message
|
|
|
|
Rename this variable.
|
|
|
|
|
|
'''
|
|
== Comments And Links
|
|
(visible only on this page)
|
|
|
|
=== on 17 Mar 2015, 08:56:02 Elena Vilchik wrote:
|
|
\[~ann.campbell.2] AFAK:
|
|
|
|
1. "None" can't be used as identifier.
|
|
|
|
2. "True" has value, which is "true".
|
|
|
|
endif::env-github,rspecator-view[]
|