20 Jun
2007
20 Jun
'07
2:23 a.m.
What would a registry of tranformation algorithms buy us compared to a module with transformation functions?
Easier registering of custom transformations. Without a registry, you'd have to monkey-patch a module.
Or users would have to invoke the module directly. I think a convention would be enough: rot13.encode(foo) rot13.decode(bar) Then, "registration" would require to put the module on sys.path, which it would for any other kind of registry as well. My main objection to using an encoding is that for these, the algorithm name will *always* be a string literal, completely unlike "real" codecs, where the encoding name often comes from the environment (either from the process environment, or from some kind of input). Regards, Martin