![](https://secure.gravatar.com/avatar/713ff48a0efeccf34727d8938993c30a.jpg?s=120&d=mm&r=g)
Feb. 29, 2008
2:54 p.m.
Nick Coghlan wrote:
In composing this response, I also realised why the new tempfile tests worked for me before I checked them in: I was testing it on the trunk, where _TemporaryFileWrapper is a classic class. Special method lookup on classic classes doesn't include the 'direct-to-type' optimisation, so those tests work with the tempfile module as written on 2.x.
tempfile is also using different implementation for TemporaryFile on Win32. On Windows it's an alias for NamedTemporaryFile while on Unix it's using a file descriptor of an unlinked file. Christian