Another important aspect of HALCON/Python is the split of inputs and outputs. Inputs are function parameters, and outputs are return values.
img = ha.grab_image(framegrabber) width, height = ha.get_image_size_s(img)
Single outputs are returned directly, and multiple outputs are returned as Python tuple. This allows clearer reasoning about data transformations, aided by ergonomic features such as destructuring. This can be seen with get_image_size_s, which returns two values, both of which can be given names directly.