Skip to content

Modernize the repr() for vtk-python objects

David Gobbi requested to merge dgobbi/vtk:python-modern-repr into master

The new style for repr(o) is similar to PySide and numpy. For example:

<vtkmodules.vtkCommonCore.vtkObject(0xbd306710) at 0x69252b820>

Or, for objects of type vtkVariant, vtkVector3f, etc:

vtkmodules.vtkCommonDataModel.vtkVector3f([1.0, 2.0, 3.0])

In comparison, the old style looked like a C-style cast:

(vtkmodules.vtkCommonDataModel.vtkVector3f)[1.0, 2.0, 3.0]

Merge request reports