Movatterモバイル変換


[0]ホーム

URL:


[Python-Dev] xreadlines : readlines :: xrange : range

Paul Prescodpaulp@ActiveState.com
Tue, 02 Jan 2001 15:26:39 -0800


Guido van Rossum wrote:>> ...>> I'm slowly warming up to xreadlines(), although we must be careful to> consider the consequences (do other file-like objects need to support> it too?).The implementation is such that it is pretty easy to add the method toother file-like objects. It is also easy to use the xreadlines module toget the same behavior for objects that do not have the method. Essentially, file.xreadlines is implemented like this:def xreadlines(self):    import xreadlines    xreadlines.xreadlines(self)Any object can add the method similarly. Paul Prescod


[8]ページ先頭

©2009-2025 Movatter.jp