Been porting a fair amount of code from to at @logilab recently. Here's a thread about how I usually proceed and what I learnt. (1/7)


Every time I see "open(filepath)", I change it into ", 'rb')" to preserve behavior. This is fine most of the times; when it's not, it's usually because of some specific business logic you'll have to investigate on anyways. (Similarly, StringIO.StringIO -> io.BytesIO.)


Sign in to participate in the conversation
La Quadrature du Net - Mastodon - Media Fédéré

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!