
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.
33 lines
627 B
Plaintext
33 lines
627 B
Plaintext
== Why is this an issue?
|
|
|
|
Python has no pre/post increment/decrement operator. For instance, ``x{plus}{plus}`` and ``++x--++`` will fail to parse. More importantly, ``{plus}{plus}x`` and ``++--x++`` will do nothing. To increment a number, simply write ``++x += 1++``.
|
|
|
|
|
|
=== Noncompliant code example
|
|
|
|
[source,python]
|
|
----
|
|
++x # Noncompliant
|
|
----
|
|
|
|
|
|
=== Compliant solution
|
|
|
|
[source,python]
|
|
----
|
|
x += 1
|
|
----
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
=== Message
|
|
|
|
Python does not include the [pre|post][increment|decrement] operator.
|
|
|
|
|
|
endif::env-github,rspecator-view[]
|