Menu
Perl: Write-only programming language.
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
1 month 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
Synology DS225+ 2-Bay Diskstation NAS (Intel Celeron J4125 Quad-Core, 2 GB Non-ECC DDR4 SODIMM 1 x 2,5 GbE and 1 x 1 GbE RJ-45 LAN-Port) 8TB Bundle with 2X 4TB Seagate Ironwolf
Affiliate
$981.42
Fort Knox For Your GeForce
Security
301.1K views
1 year ago
NordVPN
Sponsored
VPN