[1.1.4] Python scripting: all([]) function not working

Asked by xslapuhk on 2019-02-03

all([]) operator is not working but other operators like any([]) work. example:

a = 1
b = 1
if all([a == 1, b == 1]):
    print ("yes")
else:
    print("no")

error:
[error] script [ all any test ] stopped with error in line 3
[error] TypeError ( all(): expected 0 args; got 1 )

same script with any([]) operator works:

a = 1
b = 1
if any([a == 1, b == 1]):
    print ("yes")
else:
    print("no")

("yes" is printed)

this is not a problem with Jython i tested both scripts with plain Jython

i am using SikuliX 1.1.3 for mac

Question information

Language:
English Edit question
Status:
Answered
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Last query:
2019-02-03
Last reply:
2019-02-03
RaiMan (raimund-hocke) said : #2

Sorry, have to correct my first comment:

the builtin method all() is overwritten by SikuliX and defines the Region containing all screens in a multi-monitor environment.

Sorry for the inconvenience, did not notice this.

This will only be fixed in 1.1.4 the next days.

********************** workaround:
import __builtin__ as JY
a = 1
b = 1
if JY.all([a == 1, b == 1]):
    print ("yes")
else:
    print("no")
------------------------------------------

RaiMan (raimund-hocke) said : #3

is fixed in version 1.1.4.

Can you help with this problem?

Provide an answer of your own, or ask xslapuhk for more information if necessary.

To post a message you must log in.