Skip to content

Commit 551425b

Browse files
committed
Fix markdown linter errors
Signed-off-by: edanhub <[email protected]>
1 parent d0e7050 commit 551425b

File tree

1 file changed

+3
-3
lines changed
  • docs/Secure-Coding-Guide-for-Python/CWE-697/CWE-595

1 file changed

+3
-3
lines changed

docs/Secure-Coding-Guide-for-Python/CWE-697/CWE-595/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ while(a is b):
3737
print (f"{a} is {b}?", a is b)
3838
```
3939

40-
__Output of example01.py:__
40+
**Output of example01.py:**
4141

4242
```bash
4343
----------Memory optimization with strings----------
@@ -59,7 +59,7 @@ The first set of print statements illustrates string interning. While `a` and `b
5959

6060
The non-compliant code shows how the default comparison operator compares object references rather than the object values. Furthermore, it displays how this causes issues when comparing lists of objects, although it applies to other types of collections as well. Then, it shows how the `in` operator also depends on the behavior of the `__eq__` method and, therefore, also returns a non-desirable result. Finally, it performs the comparison with the `is` operator, which checks as to whether the references point to the same object regardless of the stored value.
6161

62-
[*noncompliant01.py:*](noncompliant01.py)
62+
_[noncompliant01.py:](noncompliant01.py)_
6363

6464
```py
6565
""" Non-compliant Code Example """
@@ -94,7 +94,7 @@ print(a is b)
9494

9595
In this compliant solution, the `__eq__` method is implemented and the comparisons that not use `is` now correctly compare the object values, rather than the object reference. The `is` operator does not call `__eq__`, hence the last print will still display `False`.
9696

97-
[*compliant01.py:*](compliant01.py)
97+
_[compliant01.py:](compliant01.py)_
9898

9999
```py
100100
""" Compliant Code Example """

0 commit comments

Comments
 (0)