112 reputation
5
bio website
location Dallas, TX
age 37
visits member for 3 years, 7 months
seen Sep 3 at 6:19

Apr
25
awarded  Teacher
May
12
answered Automatic programming: write code that writes code
Mar
6
awarded  Editor
Jun
29
awarded  Supporter
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.
Jun
29
awarded  Scholar
Jun
29
awarded  Student
Jun
28
asked What is the proper name for this design pattern in Python?