Python subclassing a class with custom __new__
问题 There's a class (not created by me, from a 3rd party library) that has no __init__ declared (other than object 's __init__ ), and this is its __new__ : def __new__(cls, uid): self = super().__new__(cls, uid) self._info = get_info_from_uid(uid) return self I can't see why didn't they just use __init__ here, but they didn't. Now I'd like to subclass this and give it an additional attribute; before I checked the source-code of the class (only the documentation), I thought it's just using __init_