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

I looked around the project and did not find this, so I decided to work on a patch. I'm not sure I have a reasonable explanation for this behavior though:...

new snippets

When creating the previous snippet I was not sure about a couple of things: * What is is this after every snippet title (`###`) in the README: ``? Should it...

question

## Description Hey 👋 , I'm member of the Developer Outreach team at DeepSource and ran DeepSource analysis on my fork of the repo. It found some interesting [code quality...

Hey @satwikkansal, I'm a PM at Deepnote where we're building a collaborative data science notebook. I've submitted a PR so that anyone can open your notebook in Deepnote in one...

`'WKHS.US.TXT'.rstrip('.US.TXT')` will return `WKH` rather than `WKHS`.

new snippets

This article might be a good candidate for a new code snippet: https://web.eecs.utk.edu/~azh/blog/pythonstringsaremutable.html

new snippets

Code example: ```python >>> def a(b=3000): ... return b is 3000 [...] >>> a() True >>> a(b=3000) False ``` From this article: https://utcc.utoronto.ca/~cks/space/blog/python/PythonIsWithLiteral

new snippets

This repository unleashes potentially deadly information and ideas to interviewers. Thus, it can become the potential cause of several interview candidates pulling their hair out, possibly reaching a state of...

Using cooked literals as regex patterns makes the baby Jesus cry.

``` python def foo(x): if x: y = 1 print(f"y={y}") foo(x=True) y=1 foo(x=False) Traceback (most recent call last): File "", line 1, in File "", line 4, in foo UnboundLocalError:...