https://github.com/treyhunner/python-oddities
Yes this repository will be renamed soon...
https://github.com/treyhunner/python-oddities
Last synced: 26 days ago
JSON representation
Yes this repository will be renamed soon...
- Host: GitHub
- URL: https://github.com/treyhunner/python-oddities
- Owner: treyhunner
- Created: 2024-06-21T14:50:38.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-20T17:19:24.000Z (about 1 year ago)
- Last Synced: 2025-02-28T16:33:31.225Z (10 months ago)
- Size: 12.7 KB
- Stars: 26
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Python Oddities and Peculiarities
These are snippets of Python code with results that you may find surprising, especially if you're new to Python.
## Categories
- **gotchas**: these sometimes bite new Python programmers. The most useful sort of oddity to discuss.
- Example: mutable default function arguments
- **curiosities**: a peculiarity that's unexpected, but not something you'd care about day-to-day
- Example: `-5` to `256` are always identical but other numbers aren't
- **absurdities**: absurd code, just for the fun of it
- example: `{*()}` vs. `set()`