Skip to content
Snippets Groups Projects
Commit 8824c176 authored by Brandon Rodriguez's avatar Brandon Rodriguez
Browse files

Add __repr__ for basic node and edge classes

parent 2f509f3f
Branches
No related merge requests found
......@@ -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.
......
......@@ -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):
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment