Clever little example that shows how flexible Python’s dunder methods can be. It’s a neat reminder that even simple overrides can completely change built-in behaviour. Could this kind of trick be useful in real projects, or is it more of a teaching tool?
Always Five Trick → Class always returns 5 no matter what when you use len().
Please log in to comment on this post.
More Posts
- © 2026 Coder Legion
- Feedback / Bug
- Privacy
- About Us
- Contacts
- You Tube
- Tiktok
- Premium Subscription
- Terms of Service
- Early Builders
chevron_left
More From pythonclcoding
Related Jobs
- Warehouse AssociateTesla · Full time · Rensselaer, IN
- Principal Software Engineer (BE focused/full-stack)- Words With FriendsZynga · Full time · Canada
- Warehouse AssociateTesla · Full time · Plattsburgh, NY
Commenters (This Week)
joente
1 comment
kyle
1 comment
Unni Mana
1 comment
Contribute meaningful comments to climb the leaderboard and earn badges!