Open sfiruch opened 1 year ago
@Lukas113 @kenfus @rohitcbscient Opinions?
I think it makes sense to have a convention-document which describes how to organize code in general.
To me, the following makes sense:
__init__
function where you need the parameters in the scope of the same object. This means, that these parameters should be relevant for current or future instance-bound functions or just serve as an object-storage.So to conclude, to me it seems fine to pass parameters, provide static functions or create objects wherever it makes sense to do so. Also, in my opinion more consistency is desired. I would also recommend to create more protected/private functions where we don't care about API consistency, but for public functions we should. So changing private/protected code (where we care about implementation details) doesn't cause an immediate API breaking change each time we release a new version.
I think this answers the questions you stated to some extend?
In the following example, we require parameters in three different places:
Should we strive for more consistency? If so, in which direction?
Somewhat related, should we tend more towards static methods, or constructors: