Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
ericvsmith
on Nov 7, 2024
|
parent
|
context
|
favorite
| on:
Don't return named tuples in new APIs
What you're seeing here is an optimization about integers, not about pass by value. CPython only does this for small integers:
$ python -c "print(int('3') is int('3'))" True $ python -c "print(int('300') is int('300'))" False
Other implementations make different choices.
Consider applying for YC's Winter 2027 batch!
Applications
are open till November 2.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: