3 ms·
Personally it feels like spaghetti code. Tornado for instance is a web server written in Python and there are classes that have many parents and kwargs is used
by pixie_ 13y ago
Personally it feels like spaghetti code. Tornado for instance is a web server written in Python and there are classes that have many parents and kwargs is used everywhere to pass named arguments up to each parent class in the constructor. The problem is it's hard to get a grasp by looking at the constructor as to what arguments should actually be passed to a class to initialize it. There's no contract or spec enforced in python so it's easy to see how errors can crop up by missing a random argument a certain parent class is expecting. It also makes it difficult to understand what a class does when the arguments a function expects are not declared.