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-02-09 15:18:59 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ccb94add6760b8a92c8ef03cd618fcab4836860d
ccb94add
1 parent
7bfa686b
better fix for MultiArcs
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
snakes/nets.py
snakes/nets.py
View file @
ccb94ad
...
...
@@ -1182,7 +1182,7 @@ class MultiArc (ArcAnnotation) :
@type binding: `Substitution`
@return: a tuple of value
"""
return
tuple
(
c
.
bind
(
binding
)
for
c
in
self
)
return
tuple
(
t
for
c
in
self
for
t
in
iterate
(
c
.
bind
(
binding
))
)
def
modes
(
self
,
values
)
:
"""Return the list of modes under which an arc with the
annotation may flow the tokens in `values`. Each mode is a
...
...
@@ -2435,12 +2435,12 @@ class Transition (Node) :
if
input
:
for
place
,
label
in
self
.
input
()
:
try
:
place
.
check
(
v
for
v
in
iterate
(
label
.
flow
(
binding
)))
place
.
check
(
v
.
value
for
v
in
iterate
(
label
.
bind
(
binding
)))
except
ValueError
:
return
False
for
place
,
label
in
self
.
output
()
:
try
:
place
.
check
(
v
for
v
in
iterate
(
label
.
flow
(
binding
)))
place
.
check
(
v
.
value
for
v
in
iterate
(
label
.
bind
(
binding
)))
except
ValueError
:
return
False
return
True
...
...
Please
register
or
login
to post a comment