this post was submitted on 08 Dec 2023
623 points (96.4% liked)

Programmer Humor

32714 readers
736 users here now

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

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 3 points 1 year ago* (last edited 1 year ago) (1 children)

So this won't do the intended thing if a is 0.

Edit: Sorry I meant to reply to the parent comment, realising now you already write the exact same thing.

[โ€“] [email protected] 3 points 1 year ago

Also if a is an empty collection or str, or false.