html2txt contains the following code:
class Storage: pass options = Storage() options.google_doc = False options.ul_item_mark = '*'
I have not seen such an approach before. What is the use / use of this approach in setting attributes in __init__(), and is it a class even needed here?
__init__()
, . dict, . python . .
dict
, namedtuples .
python docs:
EmployeeRecord = namedtuple('EmployeeRecord', 'name, age, title, department, paygrade')
Source: https://habr.com/ru/post/1628236/More articles:Как распаковать 4 байта двоичных данных в виде 3-байтовых и 1 байтовых значений? - rubyWhen creating a loading panel using printf and \ r in c, how to save the saved "moving" code - chttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1628233/how-to-have-a-subject-in-rxswift-push-values-to-itself-without-creating-an-infinite-loop&usg=ALkJrhjwYYev6KGGPWZcoSFoA3D3lBjNTwRemove Csrf check for specific route - phpCSS/JS: анимационный встроенный элемент при изменении текста - javascriptHow to add custom code to JAXWS source code - javaHow to organize side tasks by namespace - ruby-on-railsDjango tutorial: 404 inexplicable error after completing the first page - pythonJulia - write at the beginning of the file - file-ioHow to implement deactivation using two stacks - stackAll Articles