diff --git a/doc/data/messages/c/comparison-with-itself/bad.py b/doc/data/messages/c/comparison-with-itself/bad.py new file mode 100644 index 0000000000..77794bc5c9 --- /dev/null +++ b/doc/data/messages/c/comparison-with-itself/bad.py @@ -0,0 +1,3 @@ +def is_an_orange(fruit): + an_orange = "orange" + return fruit == fruit # [comparison-with-itself] diff --git a/doc/data/messages/c/comparison-with-itself/good.py b/doc/data/messages/c/comparison-with-itself/good.py new file mode 100644 index 0000000000..b2b4296502 --- /dev/null +++ b/doc/data/messages/c/comparison-with-itself/good.py @@ -0,0 +1,3 @@ +def is_an_orange(fruit): + an_orange = "orange" + return an_orange == fruit