How to programmatically set custom labels for char view axes in Python


I would expect the following code:

view = CreateXYPlotView()
view.BottomAxisRangeMinimum = -5
view.BottomAxisRangeMaximum = 5
view.BottomAxisUseCustomRange = 1
view.BottomAxisLabels = xrange(-5, 6)
view.BottomAxisUseCustomLabels = 1

to allow me to set the tick labels for the bottom axis in the created view, similarly to how the same approach is used e.g. to set the custom ticks in e.g. a scalar color bar.
However this fails for me at the BottomAxisLabels assignment, with the following error:

Traceback (most recent call last):
  File "/home/oblomov/uni/ingv/paper/implicit-visc-bicgstab/./", line 26, in <module>
    view.BottomAxisLabels = xrange(-5, 6)
  File "/usr/lib/python3/dist-packages/paraview/", line 496, in __setattr__
    setter(self, value)
  File "/usr/lib/python3/dist-packages/paraview/", line 2612, in setProperty
    return self.SetPropertyWithName(propName, value)
  File "/usr/lib/python3/dist-packages/paraview/", line 355, in SetPropertyWithName
  File "/usr/lib/python3/dist-packages/paraview/", line 879, in SetData
    self.SMProperty.SetElement(idx, val)
TypeError: SetElement argument 2: 

What would be the correct way to set custom labels?

OK, apparently labels must be set as pairs of strings, so if one just wants to set some specific values one needs to do something like:

l = [str(x) for x in xrange(-5, 6)]
view.BottomAxisLabels = [s for p in zip(l, l) for s in p]