Closed yunruse closed 11 months ago
One hack might involve codecs
shenanigans.
The transformation is not complex – any [a-z][a-z_]+
after a unit should (in theory), capture, so long as we make sure that current syntax (eg 1e3
) is not transformed.
Implemented with tokenize
in 01e89f77b71b57bac09cdfc9f4d8b5fcd55e9f0e
This will require some slightly complex stuff to extend Python's syntax (or make a really comprehensive regex). Either way lies headaches!