Another source of excess checks in the IMP code is the decorators.
True.
I propose adding constructors to the decorators from Particle* to
express the third.
I'm not sure I follow you - you want to add extra methods to Particle?
It doesn't seem like that would scale - external modules could add their
own decorators, and obviously they can't modify the Particle base class.
The constructors would have an assertion that they
particles have the correct attributes (but this assertion would go
away in non debugged code). Thoughts?
If you replace checks with assertions, the Python interface would need
to have some checking in it, because we don't want to crash the
interpreter if somebody has a typo in their script and uses the wrong
decorator.