Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
VTK
VTK
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 581
    • Issues 581
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 162
    • Merge Requests 162
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • VTK
  • VTKVTK
  • Merge Requests
  • !1218

Merged
Opened Feb 15, 2016 by David Gobbi@dgobbiDeveloper

15995: Implement C++ templates as Python modules.

  • Overview 16
  • Commits 1
  • Changes 3

The help() function was not working on wrapped class templates due to changes in the python inspect module. As a work-around, the PyVTKTemplate type has been re-imagined as a module that contains the instantiations of the template, since python module objects provide docstrings for pydoc. PyVTKTemplate still supports the mapping protocol as before, which allows lookup of the instantiated templates via the template arguments:

>>> # equivalent to vtkVector<double,3>(0.0)
>>> v = vtkVector[float,3](0.0)
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Reference: vtk/vtk!1218
Source branch: 15995-template-pydoc