diff --git a/documents/references.md b/documents/references.md index bc58d0a93acb9ec7cac17e40cc3c784c0832d501..3a9546c4f43ae0f39890f842c35ae30f2a3f7b7a 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>