wtfpython icon indicating copy to clipboard operation
wtfpython copied to clipboard

What the f*ck Python? 😱

Results 116 wtfpython issues
Sort by recently updated
recently updated
newest added

## Problem If you import some file or object with different path, it will have different id.. Look like this The directory tree: ```bash . ├── hole │ ├── __init__.py...

Expected time to finish: 2 weeks. I'll start working on it from next week.

`next` on an empty iter raises `StopIteration` ```pycon >>> next(iter([])) Traceback (most recent call last): File "", line 1, in StopIteration ``` And if you do this in a list...

new snippets

Hello. Cool collection of WTFs I made a [blog post](https://sharpenthesaws.com/python-multiple-arithmetic-operators/) about something that belongs in this collection. I'd be happy to write up a section for it. Where should I...

new snippets

https://github.com/satwikkansal/wtfpython#-strings-can-be-tricky-sometimes Please, invert the following image to white color for dark mode users: ![image](https://github.com/satwikkansal/wtfpython/assets/66633028/6cc9c239-e803-41df-9c17-30976adcd2d4)

Hi all! A major release of WTFPython is long overdue, there are some great potential inclusions already in the Issues section, and I have a few of myself too that...

new-release

In section Strings and the backslashes, for the explanations, 2nd point with one of the examples as follows > print(repr(r'wt\\"f') 'wt\\\\"f' I think the right parenthesis is missing here. It...

easy-fix

I met a nasty bug that will now wake me up at night... It concerns floating point operations and I feel like it is not really included in your list....