> x_increment, y_increment = (scale * i for i in srcpages.xobj_box[2:])
> 
> (scale * i for i in srcpages.xobj_box[2:]) is a generator, a single
> object, it should not be possible to unpack it into 2 variables.

If you know the exact number of values in the generator, you can do 
this. Here is an oversimplified example.

  l = [0, 1, 2, 3, 4, 5]
  a, b = (elem * 10 for elem in l[:4])
  print(a, b) # prints 40 50

This is very fragile code and I would recommend against using it.

- DLD
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to