Jul-13-2019, 11:35 AM
Hi,
couple of remarks on the code:
Regards, noisefloor
couple of remarks on the code:
- Don't use global. In 99% of all cases it's a clear indication that the design pattern of your code is not good.
global
can be avoided in most cases.
- In case you need a lock within your class, make it an attribute of you class.
- The lock doesn't make sense here anyway at all, as there is no concurrent operation on anything.
- Your are using a very old school way of string formating... Use the string's
format()
method or for Python >= 3.6 f-strings.
Regards, noisefloor