Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
trs
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
trs
Commits
7f237bf1
Commit
7f237bf1
authored
Dec 24, 2011
by
Sander Mathijs van Veen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Applied pep8 recommendations on all source files.
parent
c3c37b5d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
4 deletions
+3
-4
main.py
main.py
+2
-1
src/node.py
src/node.py
+0
-1
tests/test_calc.py
tests/test_calc.py
+1
-1
tests/test_rules_poly.py
tests/test_rules_poly.py
+0
-1
No files found.
main.py
View file @
7f237bf1
#!/usr/bin/python
def
init_readline
():
import
os
try
:
...
...
@@ -17,8 +18,8 @@ def init_readline():
import
atexit
atexit
.
register
(
readline
.
write_history_file
,
histfile
)
from
src.parser
import
main
if
__name__
==
'__main__'
:
from
src.parser
import
main
init_readline
()
main
()
src/node.py
View file @
7f237bf1
...
...
@@ -91,7 +91,6 @@ class ExpressionBase(object):
return
s_root
<
o_root
or
s_exp
<
o_exp
or
s_coeff
<
o_coeff
def
is_leaf
(
self
):
return
self
.
type
!=
TYPE_OPERATOR
...
...
tests/test_calc.py
View file @
7f237bf1
...
...
@@ -55,7 +55,7 @@ class TestCalc(unittest.TestCase):
L
(
'c'
)),
L
(
'd'
))),
(
'ab(c)d'
,
N
(
'*'
,
N
(
'*'
,
N
(
'*'
,
L
(
'a'
),
L
(
'b'
)),
L
(
'c'
)),
L
(
'd'
))),
(
'ab*(c)*d'
,
N
(
'*'
,
N
(
'*'
,
N
(
'*'
,
L
(
'a'
),
L
(
'b'
)),
(
'ab*(c)*d'
,
N
(
'*'
,
N
(
'*'
,
N
(
'*'
,
L
(
'a'
),
L
(
'b'
)),
L
(
'c'
)),
L
(
'd'
))),
(
'ab*(c)^d'
,
N
(
'*'
,
N
(
'*'
,
L
(
'a'
),
L
(
'b'
)),
N
(
'^'
,
L
(
'c'
),
L
(
'd'
)))),
...
...
tests/test_rules_poly.py
View file @
7f237bf1
...
...
@@ -65,7 +65,6 @@ class TestRulesPoly(unittest.TestCase):
[
P
(
root
,
combine_polynomes
,
((
a1
,
(
l1
,
a1
[
0
],
l2
)),
(
a2
,
(
l1
,
a2
[
0
],
l2
))))])
def
test_basic_subexpressions
(
self
):
a_b
,
c
,
d
,
l1
,
l5
,
l7
=
tree
(
'a+b,c,d,1,5,7'
)
left
,
right
=
root
=
tree
(
'(a+b)^d + (a+b)^d'
)
...
...
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