BhallaLab / moose-core

C++ basecode and python scripting interface
https://moose.ncbs.res.in
GNU General Public License v3.0
15 stars 28 forks source link

Easier access to class hiearachy #489

Closed subhacom closed 3 weeks ago

subhacom commented 3 weeks ago

In the current implementation of PyMOOSE the Python classes do not reflect the MOOSE class hierarchy. For example, LIF is derived from IntFireBase, which is derived from CompartmentBase, but this information is not available in the LIF class.

This loses the advantages of object oriented programming in Python. There should at least be a Python utility function to check if an object is an instance of a base class.

subhacom commented 3 weeks ago

There is already an isinstance_(element, classobject) function