Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
cwalv
on Nov 7, 2024
|
parent
|
context
|
favorite
| on:
Don't return named tuples in new APIs
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
o11c
on Nov 7, 2024
[–]
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.
ericvsmith
on Nov 7, 2024
|
parent
[–]
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: