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

Are you saying `o` is passed by value? I think this behavior is due to the return from `id()` being interned, or not. `id(o) == id(o)` will be true in all cases


I mean that the `id` function returns by value. It's not interning since that explicitly refers to something allocated, which isn't the case here.


This is incorrect. The returned integer is a regular Python object, not some "unboxed" integer value.




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

Search: