Make unicodedata.normalize a str method

sorry for being out of the loop for a long time, but I do think it’s a big enough hit (on both time an memory) that we woudn’t want to have it always load.

But small enough that a lazy-load would be OK – yes, I suppose it’s a fairly big (surprising?) side effect to calling a methid on a str, but frankly, it’s not THAT big, and it would presumably be used only when needed – if someone is writing code where performance is that critical, they need to be profiling anyway, and might have to reconsider where/when normalization happens.

So I still ike it as a str method, with unicodedata lazy-loaded.

I started this and that is not my goal :slight_smile: – my goal is to “make unicode normalization more discoverable / accessable”.

Yes, comparisons are one reason for that, and sure, I support adding some comparison utilties, but at least my goal was not that focused.

3 Likes