Skip to content
Advertisement

Tag: data-members

Automatically-generated Python constructor

I have countless Python classes from various projects from SQLAlchemy (and a couple from Pygame as well), and I recently noticed a pattern in many of them: their constructors always went something like this: … whereby the only thing the constructor did was to transfer a set of positional arguments into an exactly identically named set of data members, performing

Advertisement