During this summer, I will post each week a short summary of what I did, the challenges I encountered and what I learned during my Summer of Code project. I am doing this for helping me to keep track of my progresses.
So how was my first week? It was great. I don’t know why but I love programming in C. It is just plain fun. I thought learning Python C API was going to be hard, but it is quite easy after all. I just read the code in Python itself and check the reference manual for the things I don’t know. My biggest surprise, this week, was really learning how to do subclassable types. It is strikingly easy, however it’s quite verbose. You can look at my scratch extension module, if you want a minimal working example.
Other than learning the C API, I started working on the
cStringIO/StringIO merge. My current plan is to separate the cStringIO
module into two private submodules,
_string_io. One will
be for bytes literals (ASCII), and the other for Unicode.
This will reflect the changes made to the I/O subsystem in Python 3000.
These two submodules will provide optional implementations for the
speed-critical methods, like
One the best things, of this week, was the great feedback I got from other Python developers, and particularly from my mentor Brett Cannon, who cheerfully answers all my questions. Now, I just hope the following week will be as fun, or even more, as this one.