Opened 7 years ago

Closed 5 years ago

Last modified 5 years ago

#4953 closed enhancement (worksforme)

Generator vs. List

Reported by: Vitalij Ruge Owned by: Martin Sjölund
Priority: normal Milestone: 1.16.0
Component: MetaModelica Version:
Keywords: Cc:

Description

For functions like boolAndList and boolOrList a generator like for python (see. https://stackoverflow.com/questions/231767/what-does-the-yield-keyword-do) can be interesting.

Change History (2)

comment:1 by Martin Sjölund, 5 years ago

Resolution: worksforme
Status: newclosed

This already exists:

>>> max(x for x in {true,false,true})
true

>>> setCommandLineOptions("-g=MetaModelica")
true

>>> boolAnd(true,false)
false

>>> boolOr(x for x in {true,false,true})
true

comment:2 by Francesco Casella, 5 years ago

Milestone: Future1.16.0
Note: See TracTickets for help on using tickets.