It sort of is -- the new I/O library uses the file descriptor if no filename is given. There were no unit tests that verified the old behavior, and I think it was of pretty marginal usefulness. Code inspecting f.name can tell the difference by looking at its type -- if it is an int, it's a file descriptor, if it is a string, it's a file name.
On 8/15/07, Eric Smith <[EMAIL PROTECTED]> wrote: > I mentioned this in another message, but I thought I'd mention it here. > > I see this change in the behavior of sys.stdin.name, between 2.3.3 and > 3.0x (checked out a few minutes ago). > > $ python > Python 2.3.3 (#1, May 7 2004, 10:31:40) > [GCC 3.3.3 20040412 (Red Hat Linux 3.3.3-7)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import sys > >>> sys.stdin.name > '<stdin>' > > > $ ./python > Python 3.0x (py3k:57077M, Aug 15 2007, 17:27:26) > [GCC 3.3.3 20040412 (Red Hat Linux 3.3.3-7)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import sys > >>> sys.stdin.name > 0 > > > I see similar behavior with sys.stdout and sys.stderr. > > Is this deliberate? I can file a bug report if need be, just let me know. > > Eric. > > _______________________________________________ > Python-3000 mailing list > Python-3000@python.org > http://mail.python.org/mailman/listinfo/python-3000 > Unsubscribe: > http://mail.python.org/mailman/options/python-3000/guido%40python.org > -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com