Employed specific arithmetic methods for performance when getting new values.
Initialise xrangeiterator with only pertinent details, not xrange objects.
1a=4 2 3deff(x): 4ifnotx: 5defg(y): 6returnx,y,a 7returng# UnboundLocalError: not defined if x is true 8 9result=f(1)(2) 10assertresult==(1,2,4)