Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)

src/9/m/9ML-0.1.0/nineml/abstraction_layer/visitors/cloner.py   9ML(Download)
    def visit_oncondition(self, on_condition, **kwargs):
        return nineml.abstraction_layer.OnCondition(
                trigger = on_condition.trigger.accept_visitor(self, **kwargs),
                event_outputs = [ e.accept_visitor(self, **kwargs) for e in on_condition.event_outputs ],
                state_assignments = [ s.accept_visitor(self, **kwargs) for s in on_condition.state_assignments],

src/9/m/9ML-0.1.0/test/unit/nineml_test/abstraction_layer/component/dynamics_test.py   9ML(Download)
		# The source regime for this transition will be set as this regime.
        from nineml.abstraction_layer import Regime
        from nineml.abstraction_layer import OnCondition,OnEvent
        from nineml.exceptions import NineMLRuntimeError
 
        r = Regime(name = 'R1')
        self.assertEquals( set( r.on_conditions ), set() )
        self.assertRaises( NineMLRuntimeError, r.add_on_condition, OnEvent('sp1') )
        r.add_on_condition( OnCondition('sp1>0') )
        #from nineml.abstraction_layer.component.dynamics import Regime
        from nineml.abstraction_layer import Regime
        from nineml.abstraction_layer import OnCondition,OnEvent
        from nineml.exceptions import NineMLRuntimeError
        r = Regime(name = 'R1')