|
|
|
|
|
by mythrwy
1366 days ago
|
|
Yes very much this. I've worked on two projects in the last year that used metaclasses. Neither needed them in the least and they simply added noise and complication. In one case I think the author did believe he needed them, or was going to. He didn't, but I think he believed it was the best way to go about the inheritance he was doing. The other case was exactly what you say. The person wanted to show how advanced their knowledge of Python was. The funny part about the second case (which included every advanced or new Python feature under the sun, including the walrus operator shoehorned in for good measure) the code simply didn't work at all. It ran but was wrong. The author was so busy demoing his advanced knowledge he forgot to make it work. And was unable to debug it in a timely fashion due to his overuse of abstractions and features. So less "advanced" me was brought in to make it work. Which I did. |
|