Skip to content
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

python data types revisited! #32

Closed
azamifard opened this issue Sep 29, 2020 · 0 comments
Closed

python data types revisited! #32

azamifard opened this issue Sep 29, 2020 · 0 comments

Comments

@azamifard
Copy link
Contributor

@aperrin66
@akorosov

As mentioned in nansencenter/django-geo-spaas-harvesting#40 Python lists are only needed when we want to save the order of elements inside it. When we don't need order, there is no need to use a python list!!!!

Sets should be used for the case that we add another element in it afterwards.
tuple should be used for the case that we do not need to change it afterwards.

For the speed of running the code the order of selection data types is as follows:

1.tuple
2.set
3.list

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant