wtfpython
wtfpython copied to clipboard
What the f*ck Python? 😱
How about this one: ``` >>> 4 ** 300 == 8 ** 200 True >>> 4 ** 300 is 8 ** 200 False >>> 4 ** 30 is 8 **...
We are all used to using: ``` class Foo: pass class Bar(Foo): def __init__(self): super().__init__() ``` But once, during coding, I just wondered, how does `super` know about the `Bar`...
Relates to [class attributes and instance attributes](https://github.com/satwikkansal/wtfpython#-class-attributes-and-instance-attributes) considering the following code: ```python class Foo: _count1 = 0 _count2 = 0 @staticmethod def total():Foo._count2 += 1 @classmethod def count(cls):cls._count1 += 1...
Whose the f using light mode in 2022? 
This example: >>> hash(WTF()) == hash(WTF()) # hashes _should_ be different as well True 1. Is not explained. 2. Has result contrary to comment. 3. May not be explainable. It...
Hello everyone! I've recently revamped project's documentation using MkDocs, a fantastic tool for creating elegant and easy-to-maintain documentation. Additionally, I've added the original English version of "wtfpython" along with its...
Hhh Accessori Auto Shop Accessori Auto Shop Home Prodotti Contatti Benvenuto nel nostro negozio di accessori auto! Scopri la nostra vasta selezione di accessori per auto. © 2024 Accessori Auto...
Accessori Auto Shop Accessori Auto Shop Home Prodotti Contatti Benvenuto nel nostro negozio di accessori auto! Scopri la nostra vasta selezione di accessori per auto. © 2024 Accessori Auto Shop....
G
H Accessori Auto Shop Accessori Auto Shop Home Prodotti Contatti Benvenuto nel nostro negozio di accessori auto! Scopri la nostra vasta selezione di accessori per auto. © 2024 Accessori Auto...
Haven't seen anyone raised this before. ``` import sys sys.setrecursionlimit(4) class Foo: class Foo: foo = 1 ``` Raises `RecursionError: maximum recursion depth exceeded while calling a Python object`