encapsulating a global variable

Rhodri James rhodri at kynesim.co.uk
Wed Feb 26 08:59:30 EST 2020


On 25/02/2020 15:06, BlindAnagram wrote:
> My interest in this stems from wanting to keep the dictionary only
> available to the function that uses it and also a worry about being
> called from threaded code.

Hiding your dictionary away inside a class or instance isn't going to 
protect it from threading disasters by itself, though it will make it 
easier to protect it as you need.

-- 
Rhodri James *-* Kynesim Ltd


More information about the Python-list mailing list