← Back to team overview

sikuli-driver team mailing list archive

[Bug 1474033] Re: Python construc to swap variables doesn't work in Sikuli

 

this works with 1.1.0:

x = 0
y = 1
print x, y
y, x = x, y
print x, y

prints 
0 1
1 0

** Changed in: sikuli
       Status: New => Opinion

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

Title:
  Python construc to swap variables doesn't work in Sikuli

Status in Sikuli:
  Opinion

Bug description:
  In PYTHON there is a simple construct to swap Variables without the
  use of any Temp Variable "x,y = y,x" but it doesn't work in SIKULI, Am
  I right?

  Here is my example...

  var1 = 0
  var2 = 1
  print "var1 = ", var1
  print "var2 = ", var2

  var1, Var2 = var2, var1

  print "var1 = ", var1
  print "var2 = ", var2

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


References