Message51693
The __getattr__ magic makes the following kind of code fail with SpooledTemporaryFile:
f = SpooledTemporaryFile(max_size=something)
rd = f.read
wr = f.write
for x in y:
...use rd(size) and wr(data)...
The problem is that the captured 'f.read' method is the one from the StringIO instance, even after the write() rolled the file over to disk. Given that capturing bound methods is a semi-official speed hack advertised in some respected places, we might have to be careful about it. About such matters I am biased towards first getting it right and then getting it fast...
Also, Python 2.5 is already out, so this will probably be a 2.6 addition. |
|
Date |
User |
Action |
Args |
2007-08-23 15:56:09 | admin | link | issue1630118 messages |
2007-08-23 15:56:09 | admin | create | |
|