Message 149293 - Python tracker
> Ok, a couple of further (minor) issues: > - I don't think AssertionError is the right exception type. TypeError > should be used when a type mismatches (e.g. "not an unicode object"); > - you don't need to check for d_type being NULL, since other methods don't; > - if type_qualname == NULL, the original error should be retained. Fixed. (I suspect, though, that caching the value of __qualname__ is an unnecessary optimisation.)