112 reputation
5
bio website
location Dallas, TX
age 37
visits member for 3 years, 10 months
seen Nov 16 at 1:50

Jun
29
comment What is the proper name for this design pattern in Python?
Thank you for that pointer. One of the reasons I liked the single-class approach is it allowed me to subclass models and do stuff like: def get(id): #code-goes-here return self(results) and I didn't want to give up the simplicity of return self(results). But, in other places, such as the query module, I pass in the "model" classes so the results could be initialized to the proper class. Evidently this is what Django is doing too. I finally bit the bullet and switched back to the two class approach where a proxy does the get instead of a subclass and am passing the model class to proxy.