Greg Ewing wrote: > Antoine Pitrou wrote: > >> What do you mean? open() doesn't allow you to wrap other file objects. > > I'm talking about things like GzipFile that take a > filename and mode, open the file and then wrap the > file object. The tempfile module would be another example. For that reason, I think Steven's idea of a filetools module which provided context managers and the like that wrapped *existing* file-like objects might be preferable. Otherwise it may be a while before sync-aware code is able to deal with anything other than basic files. Cheers, Nick. -- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia ---------------------------------------------------------------
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4