Articles tagged api

  1. Designing binary/text APIs in a polygot py2/py3 world

    By Floris Bruynooghe

    The general advice for handling text in an application is to use a so called unicode sandwich: that is decode bytes to unicode (text) as soon as receiving it, have everything internally handle unicode and then right at the boundary encode it back to bytes. Typically the boundaries where the …