New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
05-suggesting a more Pythonic approach to copying #834
Comments
Hi @ddefranza , There is also a PR #715 from a while back proposing to use Let's see if anyone else from the community wants to offer an opinion about |
Sounds good. Introducing the |
No one else has chimed in @ddefranza , so if you are still available to make the |
I apologize for missing this issue -- please feel free to @-mention me directly or with @swcarpentry/python-novice-inflammation-maintainers. I agree with laying the groundwork for introducing the |
@maxim-belkin we use other |
I'm not opposed to adding So, I think the right thing to do here is to implement the change that David suggests -- again, I agree that |
In lesson Programming with Python, episode 5, "Storing Multiple Values in Lists" there is a very important discussion of making a copy of a list. This is demonstrated by literally creating a new list from the variable assigned to the old list, e.g.:
This is fine, as is using slicing to do the same. However, the more Pythonic way to accomplish this is by using the copy method, e.g.:
Thanks!
The text was updated successfully, but these errors were encountered: