Constructors in the Reference

Is there a way to see a list of all aviable contrutors for a Class. I’ve looked in the refernce but I didn’t found anything like a constructor in the documentation.

Any suggestions?

Thanks Martin

That does appear to be an unfortunate oversight in the generated documentation.

One workaround would be to attempt to call a version of the constructor that you know doesn’t exist. For a C++ generated class, you could pass (None) as the parameter, for instance; none of the C++ classes will accept None. This will report the available constructors. (This only works in Panda3D 1.1.)

For instance:

>>> NodePath(None)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: Arguments must match one of:
NodePath(PandaNode * node)
NodePath(NodePath const * copy)
NodePath(string top_node_name)
NodePath(NodePath const * parent, PandaNode * child_node)


A thanks that works.
Is there a chance to write an extions for genpydocs to have the constructors in the reference.
My next problem is to figure out where a class is locatet(like pandac.PandaModules). Will this be include in a future version of genpydocs or is there a way to add this funcionality.
Have somebody made any changes to genpydocs since 6.12.2005?

User contributions are welcome. :slight_smile: