KeyValues.fromelem() currently creates a new instance of the same type but with additional instance state (as defined in kwargs) passed on and assigned to the new object.
The question is whether this can be changed to a classmethod which seems much more fitting. The question of the state passing is what needs to be addressed and I have a feeling that progress with #2 may aid with this.
Issue by tgoodlet Friday Sep 23, 2016 at 21:04 GMT Originally opened as https://github.com/sangoma/sandswitches/issues/4
KeyValues.fromelem()
currently creates a new instance of the same type but with additional instance state (as defined inkwargs
) passed on and assigned to the new object.The question is whether this can be changed to a
classmethod
which seems much more fitting. The question of the state passing is what needs to be addressed and I have a feeling that progress with #2 may aid with this.