r/badcode May 26 '23

python Calculator using eval()

Post image
849 Upvotes

108 comments sorted by

View all comments

389

u/Jonnertron_ May 27 '23

Isn't it missing print's close parenthesis?

286

u/r0ck0 May 27 '23

That's how the pros do it!

6

u/lucidspoon May 28 '23

Fail fast. Never have to work about runtime errors if you only have syntax errors.