Yeah you are right axes should not be in the parent class. There are several other possible constraints that can be implemented in pylearn2, for example you can implement a constraint such that norm of the weights of the neural network is constant. Or sometimes in autoencoders (esp, with gated ones using linear decoder) they usually constrain their decoder weights to be centered  with unit standard deviation. You can constrain your gradients too in the way that Razvan, Mikolov and Alex Graves did.