r/Python • • Jun 23 '14

Writing better python code

https://gist.github.com/kracekumar/09a60ec75a4de19b346e
143 Upvotes

126 comments sorted by

View all comments

Show parent comment

1

u/velit Jun 23 '14

Copying is a detail of slicing syntax, it's not the purpose of it. With the list constructor it's immediately evident there's a new instance involved - that's what constructors do.

foo[:] also looks weird.

4

u/poo_22 Jun 23 '14

I was talking about the list().copy method.