Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
b9d85467
Commit
b9d85467
authored
Jul 25, 2015
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adapt old imports for Py2/Py3
parent
37be5ca5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
4 deletions
+15
-4
Cython/Plex/Machines.py
Cython/Plex/Machines.py
+7
-2
Cython/Plex/Regexps.py
Cython/Plex/Regexps.py
+4
-1
Cython/Plex/Transitions.py
Cython/Plex/Transitions.py
+4
-1
No files found.
Cython/Plex/Machines.py
View file @
b9d85467
...
@@ -12,7 +12,12 @@ import sys
...
@@ -12,7 +12,12 @@ import sys
from
.Transitions
import
TransitionMap
from
.Transitions
import
TransitionMap
LOWEST_PRIORITY
=
-
sys
.
maxint
try
:
from
sys
import
maxsize
as
maxint
except
ImportError
:
from
sys
import
maxint
LOWEST_PRIORITY
=
-
maxint
class
Machine
(
object
):
class
Machine
(
object
):
...
@@ -172,7 +177,7 @@ class FastMachine(object):
...
@@ -172,7 +177,7 @@ class FastMachine(object):
def
make_initial_state
(
self
,
name
,
state
):
def
make_initial_state
(
self
,
name
,
state
):
self
.
initial_states
[
name
]
=
state
self
.
initial_states
[
name
]
=
state
def
add_transitions
(
self
,
state
,
event
,
new_state
,
maxint
=
sys
.
maxint
):
def
add_transitions
(
self
,
state
,
event
,
new_state
,
maxint
=
maxint
):
if
type
(
event
)
is
tuple
:
if
type
(
event
)
is
tuple
:
code0
,
code1
=
event
code0
,
code1
=
event
if
code0
==
-
maxint
:
if
code0
==
-
maxint
:
...
...
Cython/Plex/Regexps.py
View file @
b9d85467
...
@@ -9,7 +9,10 @@
...
@@ -9,7 +9,10 @@
from
__future__
import
absolute_import
from
__future__
import
absolute_import
import
types
import
types
from
sys
import
maxint
as
maxint
try
:
from
sys
import
maxsize
as
maxint
except
ImportError
:
from
sys
import
maxint
from
.
import
Errors
from
.
import
Errors
...
...
Cython/Plex/Transitions.py
View file @
b9d85467
...
@@ -6,7 +6,10 @@
...
@@ -6,7 +6,10 @@
from
__future__
import
absolute_import
from
__future__
import
absolute_import
from
sys
import
maxint
as
maxint
try
:
from
sys
import
maxsize
as
maxint
except
ImportError
:
from
sys
import
maxint
class
TransitionMap
(
object
):
class
TransitionMap
(
object
):
...
...
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