On Sat, 22 Jul 2000, Barry A. Warsaw wrote: > I've long wanted to make the print statement able to handle > alternative output files in a more convenient syntax. Yes you can > rebind sys.stdout, but that is often very clumsy to get right in the > face of exceptions. Then why not go the other way, and get sys.stdout-rebinding easier to get right? something like sys.push_stdout(fileobj) try: print and stuff finally: sys.pop_stdout() > Thoughts? Ummm...between this and Hyauiu's proposal, I'm afraid we're bloating Python way too much. -- Moshe Zadka <moshez@math.huji.ac.il> There is no GOD but Python, and HTTP is its prophet. http://advogato.org/person/moshez
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