Menu
Whitespace: Programming with just spaces and tabs.
Home
Hot
Random
Search
Browse
AI
AWS
Agile
Algorithms
Android
Apple
Azure
Backend
Bash
C++
Cloud
All Categories
HTTP 418: I'm a teapot
The server identifies as a teapot now and is on a tea break, brb
HTTP 418: I'm a teapot
The server identifies as a teapot now and is on a tea break, brb
Builtins Memes
Posts tagged with Builtins
Why Can I Do This
Python
Programming
20 days ago
20.9M views
1 shares
Someone just discovered they can override __getattribute__ to intercept attribute access and dynamically fetch functions from the builtins module. So now their Blorp class can magically call hello_world("print") even though that method doesn't exist—it's just grabbing the print function at runtime. Python's dunder methods are like giving a toddler the keys to a bulldozer. Sure, you can do it, but should you? Your future self (and anyone who has to maintain this code) will be debugging phantom methods wondering where the hell they're defined. Spoiler: they're not. They're summoned from the void like some dark magic ritual. Just because Python lets you doesn't mean your code review should.
Today's picks
Programming Computer Science Code Algorithm Software Engineer T-Shirt, Men, Black, 3X-Large
Affiliate
$14.99
NordVPN
Sponsored
VPN
Using the Command Line
Linux
157.9K views
4 years ago