On Jun 21, 2004, at 12:53 PM, Raymond Hettinger wrote: > [Scott David Daniels] >> One feature that I'd find nice in itertools is access to "universal >> newlines" behavior. This would make it much easier to extend zipfile >> and other compression-related code to provide pseudo-files that > iterate >> properly. > > > My initial thoughts are: > > * the functionality is useful > * it duplicates some code from fileobject.c Which isn't available in pure Python anywhere, and isn't extensible enough to do what he wants to do. > * unsure whether the needs to be Unicode aware Universal newlines doesn't really make sense in the context of unicode. Unicode would definitely have another implementation, anyway (unicode.splitlines(...)). FWIW, I've wanted to do things like this before.. but I think that the universal newlines support in fileobject should just be refactored so that you can use it without a file object (possibly with a similar API to this). -bob -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2357 bytes Desc: not available Url : http://mail.python.org/pipermail/python-dev/attachments/20040624/0033ecdc/smime.bin
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