Skip to content

Comment on Python Multiple Assignment Is a Puzzleparent

Comments

Python is designed for it, and it makes it cleaner, so why not?

EAFP: Easier to ask for forgiveness than permission

That being said, just a blanket except is a bad idea.

Thanks for the ValueError tip. I added it as well as a TypeError just in case the input comes in as a string. My skills are beginner level at best, tips like yours help a lot!

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.