Message 381232 - Python tracker
> This code is non-trivial :-( Should we provide a *new* C function doing that? We could discuss adding a new C function, but IMHO that code is not especially horrible or unreadable. I agree it could be simpler, though.