I'm not an expert programmer and I always thought that map(fun,my_list) was the type of function that would internally apply fun to the elements of my_list without guaranteeing the order of application. I even thought that internally the interpreter it could apply the function in parallel and only lock any variables that are shared.
I then thought that this might not be possible because I have already seen some people using:
expecting the same results as in: for i in my_list: fun(i)
Which is applies fun to each element of my_list in the order of the elements in the list.
So I thought that it would be really nice if this parallelism under the hood only happens when doing:
for i in set(my_list): fun(i)
Since it's explicit and understood that set doesn't respect the order of the list. However set() also removes duplicates.
So the questions are: 1- Is there any data structure that doesn't guarantee order preservation but allows duplicates? 2- Is it possible with simple syntax to make multi threaded parts of code in an almost transparent way? 3- Are these planned for Python 3000 or maybe 5000?
Maybe I'm completely off topic here, but who knows.