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)

Follow

Every time I see "open(filepath)", I change it into "io.open(filepath, '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.)
(4/7)

@logilab

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!