As you all know now, I am working on a reimplementation of StringIO in C (the Python version is just a BytesIO object in a TextIOWrapper). I thought I was almost done, but it turns out that I need to reimplement the whole newline translation mechanism in C. To do so, I will need to modify almost every methods of StringIO just to make it handle newlines properly -- basically reimplementing most of TextIOWrapper. I realized it would be a better idea, to rewrite TextIOWrapper in C, instead of StringIO. And then, add to it some special cases for StringIO to avoid the encoding/decoding overheads.
Already wrote a good chunk of code for this -- i.e., I rewrote IncrementalNewlineDecoder in C yesterday (turning 70 line of elegant Python code into almost 300 lines of grotesque C). Anyway, I would just like to know if some of you have hints or recommendations about this. Thanks, -- Alexandre _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
