Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In GP's example, the call to str() isn't there to make sure you get a string instead of causing a type error; it's there to substitute str() for repr() (which also returns a string). Considering that this feature is mainly meant to make 'print debugging' more convenient, it makes sense that repr() is the default choice.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: