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
2bfa878a
Commit
2bfa878a
authored
Jul 05, 2009
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Py3 fixes
parent
e1939379
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
Cython/Plex/Machines.py
Cython/Plex/Machines.py
+4
-3
Cython/Plex/Transitions.py
Cython/Plex/Transitions.py
+1
-0
No files found.
Cython/Plex/Machines.py
View file @
2bfa878a
...
...
@@ -7,7 +7,6 @@
#=======================================================================
import
sys
from
sys
import
maxint
from
Transitions
import
TransitionMap
...
...
@@ -116,7 +115,9 @@ class Node(object):
priority
=
self
.
action_priority
if
action
is
not
None
:
file
.
write
(
" %s [priority %d]
\
n
"
%
(
action
,
priority
))
def
__lt__
(
self
,
other
):
return
self
.
number
<
other
.
number
class
FastMachine
(
object
):
"""
...
...
@@ -167,7 +168,7 @@ class FastMachine(object):
def
make_initial_state
(
self
,
name
,
state
):
self
.
initial_states
[
name
]
=
state
def
add_transitions
(
self
,
state
,
event
,
new_state
):
def
add_transitions
(
self
,
state
,
event
,
new_state
,
maxint
=
sys
.
maxint
):
if
type
(
event
)
is
tuple
:
code0
,
code1
=
event
if
code0
==
-
maxint
:
...
...
Cython/Plex/Transitions.py
View file @
2bfa878a
...
...
@@ -110,6 +110,7 @@ class TransitionMap(object):
if
set
:
result
.
append
((
event
,
set
))
return
iter
(
result
)
items
=
iteritems
# ------------------- Private methods --------------------
...
...
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