Sue Adair / Square Peg in a Round Hole / CC BY-SA 2.0

Square Peg in a Round Hole

Hail to Adapters!

Dmitry Zinoviev
Published in
2 min readJun 6, 2022

--

Suppose we have a Python function that reads data from a file-like object (any object that has a read() method) — for example, pandas.read_table().

Suppose we also have string data that has been already read/extracted from a file or obtained in some other way. We want to apply the function to the data, but the data is a round peg, and the function is a square…

--

--

Dmitry is a prof of Computer Science at Suffolk U. He is loves C and Python programming, complex networks, computational soc science, and digital humanities.