[Python-3000] print() parameters in py3k

Guido van Rossum guido at python.org
Tue Nov 21 17:14:21 CET 2006


OK. I think this proposal is dead, if only because I still don't
understand it (or at least I don't understand why anyone would propose
this particular API). Everything about it seems backwards. Even if you
could explain it, that doesn't bode well for how future generations of
Python users will struggle with it. So let's stop wasting our breath
and bury it.

Summary: -1.

--Guido

On 11/21/06, Barry Warsaw <barry at python.org> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Nov 20, 2006, at 8:38 PM, Guido van Rossum wrote:
>
> > I'm still confused. Are you proposing that in order to print to a
> > different file we do
> >
> > save_file = print.file
> > try:
> >  print.file = open("log.txt", "a")
> >  print(x, y, z)
> > finally:
> >  print.file = save_file
>
> You could do that, but to make it more convenient I was thinking
> about adding class methods, such as the clone() I used earlier.
> Let's rename that method though so that it's hopefully clearer:
>
> lprint = print.open('log.txt', 'a')
> lprint(x, y, z)
> lprint.close()
>
> - -or-
>
> lprint.file.close()
>
> lprint is just another instance of whatever class 'print' is, except
> that its 'file' attribute is set to the opened log.txt file.
>
> Regardless of whether you like this or not <wink>, does that make sense?
>
> - -Barry
>
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.5 (Darwin)
>
> iQCVAwUBRWL/AHEjvBPtnXfVAQJ1TQQAltC6uJEpzkYXyb4Zr6hRrWsPmYfOyJnp
> EOLieDvn/pTOVgA+iAuccEtac+Yp5Kl8bR+5s4B8XSLoD8gbKt7aMwmwBdy7fIOc
> 2OvH+pb2rn8laMAzp/OTzg7OF+ptJFXKdfOx8+pZdy41htV+6U8rsHWUCo2F59Sj
> q3XzVDbMF44=
> =DycV
> -----END PGP SIGNATURE-----
> _______________________________________________
> Python-3000 mailing list
> Python-3000 at 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/)


More information about the Python-3000 mailing list