3 ms·
Library I wrote that mimics Python's advanced string formatting in Golang. I found that the most interesting part of this was actually testing how closely it m
by slongfield 9y ago
Library I wrote that mimics Python's advanced string formatting in Golang.
I found that the most interesting part of this was actually testing how closely it matches Python's formatter. To do that, it goes through a cgo wrapper and cffi, then uses the Python Hypothesis[1] library to generate random examples.
[1]: https://hypothesis.readthedocs.io/en/latest/ https://hypothesis.readthedocs.io/en/latest/