Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
graph_drawing
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
graph_drawing
Commits
c4fd4af7
Commit
c4fd4af7
authored
Jan 05, 2012
by
Sander Mathijs van Veen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed parent attribute to avoid cyclic references between nodes.
parent
003a9e25
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
5 deletions
+0
-5
node.py
node.py
+0
-5
No files found.
node.py
View file @
c4fd4af7
...
...
@@ -4,10 +4,6 @@
class
Node
(
object
):
def
__init__
(
self
,
value
,
*
nodes
):
self
.
value
,
self
.
nodes
=
value
,
list
(
nodes
)
self
.
parent
=
None
for
a
in
self
.
nodes
:
a
.
parent
=
self
def
__getitem__
(
self
,
n
):
return
self
.
nodes
[
n
]
...
...
@@ -38,7 +34,6 @@ class Node(object):
class
Leaf
(
Node
):
def
__init__
(
self
,
value
):
self
.
value
=
value
self
.
parent
=
None
self
.
nodes
=
None
def
__len__
(
self
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment