make _new_with_changes function also work in a subclass (#509)
* make function also work in a subclass * Use __class__ instead of type() Co-authored-by: Andreas Klöckner <inform@tiker.net> Co-authored-by: Andreas Klöckner <inform@tiker.net>
* make function also work in a subclass * Use __class__ instead of type() Co-authored-by: Andreas Klöckner <inform@tiker.net> Co-authored-by: Andreas Klöckner <inform@tiker.net>