518
you are viewing a single comment's thread
view the rest of the comments
[-] snekmuffin@lemmy.dbzer0.com 4 points 6 months ago

Pretty sure its not a PEP, but the python glossary mentions it. Searching 'python EAFP' brings up a lot of discussion on the topic too, so if nothing else its definitely a widespread phenomenon

[-] rwhitisissle@lemmy.ml 1 points 6 months ago

I think there's a difference between "python guidelines encourage" something and "this is a common coding pattern." Yes, you can use try/except for flow control, but there's a lot of people, myself included, who try to use that style sparingly.

this post was submitted on 12 May 2024
518 points (97.1% liked)

Programmer Humor

32611 readers
46 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS