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

Asked by xslapuhk

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:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
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")
------------------------------------------

Revision history for this message
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.