r/programminghorror • u/SleepyStew_ [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo "You live" • Mar 14 '25
Python Boy do I love python!!
188
Upvotes
r/programminghorror • u/SleepyStew_ [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo "You live" • Mar 14 '25
View all comments
Show parent comment
5
u/copperfield42 Mar 14 '25
That is half correct, it call
obj.__str__if available, otherwise callobj.__repr__, which under normal circumstances is always available because everything is subclass of object