use str.format() instead of %
use base16() like escaping
revised doc
rename _esc() -> escape()