From 9962d6730af9119d66150c1c1e421faeb610f071 Mon Sep 17 00:00:00 2001 From: Brandon Rodriguez <brodriguez8774@gmail.com> Date: Fri, 29 Nov 2019 13:39:38 -0500 Subject: [PATCH] Add missing reference for Python "inner classes" --- documents/references.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/documents/references.md b/documents/references.md index bc58d0a..3a9546c 100644 --- a/documents/references.md +++ b/documents/references.md @@ -8,6 +8,17 @@ All references to external logic. Includes anything from stack overflow links to ## New References References new to this project. +### Nested Classes +I felt like the 3 "functions" from our book Algorithm seemed complicated enough to each be separate entities on their +own. Rather than trying to cram all the logic into one large class, I decided to look into splitting each function into +it's own class in an attempt to compartmentalize logic. + +Inspiration came from how Django handles "model query managers" with the "models.objects.<query>" syntax. + +References for how nested classes work are: +* <https://stackoverflow.com/questions/719705/what-is-the-purpose-of-pythons-inner-classes> +* <https://www.datacamp.com/community/tutorials/inner-classes-python> + ### Class __call__ Function Used to call a class instance as if it were a function. * <https://stackoverflow.com/questions/9663562/what-is-the-difference-between-init-and-call> -- GitLab