The second thing is not redundancy - it is setting instance attributes. You can do it also like this:
class Foo:
def __init__(self, **kwargs):
for name, value in kwargs.items():
setattr(self, name, value)
But then you need to call Foo like this:
Foo(arg1=1, arg2=2, arg3=3)
Also your import seems to have improper syntax. It should be from Class import Class
. This looks redundant to you, because it seems, that you are storing each class in a separate file (module) - and that is exactly redundant. Python is not Java, you should usually hold more objects in one module. Keep in mind, that module itself is an object. Also you should name modules properly - the default code style guide says that modules should be all lowercase with no special chars. Like re
or urllib
for example.