diff --git a/documents/references.md b/documents/references.md index c3474d4ecf30b6c8e9273bc56708fa908529f028..b0a939258a88fa738e1e647e5ca54b09e911b644 100644 --- a/documents/references.md +++ b/documents/references.md @@ -84,6 +84,9 @@ More about this, as well as a solution is found at <https://stackabuse.com/pytho ### Temporarily Disabling Logger <https://stackoverflow.com/a/3116067> +### Class Str vs Repr +<https://www.geeksforgeeks.org/str-vs-repr-in-python/> + ## Older Relevant References References linked in previous assignments. diff --git a/resources/graphs/basic_graph/components.py b/resources/graphs/basic_graph/components.py index 9a44bcf38cd62afa72152391f459563331a7de8d..cbeec67d6c8f8599f5ca409469a5967682b9fdfb 100644 --- a/resources/graphs/basic_graph/components.py +++ b/resources/graphs/basic_graph/components.py @@ -58,6 +58,12 @@ class BasicEdge(): """ return self.get_name() + def __repr__(self): + """ + Programatic representation of object. + """ + return self.get_name() + #region Information Functions def get_name(self): @@ -243,6 +249,12 @@ class BasicNode(): """ return self.get_name() + def __repr__(self): + """ + Programatic representation of object. + """ + return self.get_name() + #region Display Functions def print_edge_connections(self):