Test files › Source code › sample.py
Sample Python file (sample)
A Python module with type hints, a dataclass, a generator, f-strings and a triple-quoted docstring.
↓ Download sample.py| Filename | sample.py |
| Format | Python |
| Size | 693 bytes (693 bytes) |
| MIME type | text/x-python; charset=utf-8 |
| SHA-256 | 383d1b4d296abfbb898653535afd74123a5bde452b7df12b0e9ef72730b42391 |
What this file catchesHighlighters and extractors that mishandle triple-quoted strings, and any tool that counts braces to find blocks. Python has none, so indentation is the only structure, which is what makes the mixed-indentation file below a genuine failure and not a style question.
Download & verify
curl -fsSL -o "sample.py" "https://files.hexaqa.com/code/sample.py"
curl -fsSL "https://files.hexaqa.com/code/sample.py" | sha256sum
# expect: 383d1b4d296abfbb898653535afd74123a5bde452b7df12b0e9ef72730b42391