There are certain values that are managed independent of any specific code-accessible object. The decimal precision is a good example:
We can call these context variables. As your code shows, the true "home" of the "prec" value is not some object you manage in your code, but rather some background object called the Context.
The Context is not inherited by sub-threads.
Your code is fine, because you did not use threads. Replace the map with concurrent.futures code (as in my example).
Your code will not work properly anymore. This is the issue.
Python-ideas mailing list -- firstname.lastname@example.org
To unsubscribe send an email to email@example.com
Message archived at https://firstname.lastname@example.org/message/6YU3RZ6WDWVJI7QEJKICJZN72B5FYOEV/
Code of Conduct: http://python.org/psf/codeofconduct/