Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
bdr
on Feb 12, 2009
|
parent
|
context
|
favorite
| on:
Python: copying a list the right way
By putting it in a module, you avoid having to add the method to every single class.
latortuga
on Feb 12, 2009
|
next
[–]
By putting it on Object (this is my ruby side speaking) you avoid the same thing.
ewiethoff
on Feb 12, 2009
|
prev
[–]
Hmm, no. You have to add __copy__ and/or __deepcopy__ to every class.
astrec
on Feb 13, 2009
|
parent
[–]
Only to override the default implementation.
Consider applying for YC's Summer 2026 batch! Applications are open till May 4
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: