Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Franck Pommereau
/
snakes
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Franck Pommereau
2017-04-19 23:48:33 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
193114bd86c1da9545ec5ab390858038278cffcf
193114bd
1 parent
ccb94add
fixed some issues with Py3 (some are left)
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
1 deletions
snakes/compat.py
snakes/nets.py
snakes/utils/abcd/build.py
snakes/compat.py
View file @
193114b
...
...
@@ -24,4 +24,14 @@ except NameError :
def
next
(
obj
)
:
return
obj
.
next
()
try
:
unicode
except
NameError
:
unicode
=
str
try
:
reduce
except
NameError
:
from
functools
import
reduce
PY3
=
sys
.
version
>
"3"
...
...
snakes/nets.py
View file @
193114b
...
...
@@ -2044,7 +2044,7 @@ class Place (Node) :
"""Iterate over the tokens in the place, including
repetitions.
>>> p = Place('p',
range(3
)*2)
>>> p = Place('p',
list(range(3)
)*2)
>>> list(sorted([tok for tok in p]))
[0, 0, 1, 1, 2, 2]
...
...
snakes/utils/abcd/build.py
View file @
193114b
...
...
@@ -5,6 +5,7 @@ from snakes.lang import unparse
import
snakes.utils.abcd.transform
as
transform
from
snakes.data
import
MultiSet
from
snakes
import
*
from
snakes.compat
import
*
class
Decl
(
object
)
:
OBJECT
=
"object"
...
...
Please
register
or
login
to post a comment