← Back to team overview

sikuli-driver team mailing list archive

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

 

workaround:

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

__builtin__ is auto-imported at script run.

** Summary changed:

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

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1814427

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

Status in Sikuli:
  Fix Committed

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

  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

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1814427/+subscriptions


References