> Yes I was thinking of a Logger class which would actually contain
self.log as an attribute and then all the log-able classes could inherit
this class and use the self.log outright...
Well, this would make much more sense, and I already regretted that I didn't strongly suggest to just use module-level logger in my RFC. Because for constructor-less classes, we'd now need to add constructor, and due to Python's verbose super() syntax, that really sucks.
But yeah, you can easily mix-in a behavior (i.e. standalone methods), but not so easy a state, which would require a constructor to initialize.
> Yes I was thinking of a Logger class which would actually contain
self.log as an attribute and then all the log-able classes could inherit
this class and use the self.log outright...
Well, this would make much more sense, and I already regretted that I didn't strongly suggest to just use module-level logger in my RFC. Because for constructor-less classes, we'd now need to add constructor, and due to Python's verbose super() syntax, that really sucks.
But yeah, you can easily mix-in a behavior (i.e. standalone methods), but not so easy a state, which would require a constructor to initialize.
Anyway, the refactor is ready.