Re: Misleading wikipedia article on Python 3?
- From: greg <greg@xxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 10 Aug 2007 20:28:52 +1200
Evan Klitzke wrote:
You can easily modify print in a safe way.
Yes, but you'd still have to replace the builtin print
function with your own to get it used by non-cooperative
code. That doesn't seem to gain you much over replacing
sys.stdout with something that intercepts and logs
stuff written to it.
> What do you find wrong with this sort of "monkeypatching"?
At least sys.stdout was designed somewhat with the
possibility of replacing it in mind. It's not an
entirely unexpected thing to do. Replacing something
in the builtin namespace seems like a more drastic
step, somehow.
--
Greg
.
- References:
- Misleading wikipedia article on Python 3?
- From: John J. Lee
- Re: Misleading wikipedia article on Python 3?
- From: "Martin v. Löwis"
- Re: Misleading wikipedia article on Python 3?
- From: John J. Lee
- Re: Misleading wikipedia article on Python 3?
- From: "Martin v. Löwis"
- Re: Misleading wikipedia article on Python 3?
- From: John J. Lee
- Re: Misleading wikipedia article on Python 3?
- From: Carsten Haese
- Re: Misleading wikipedia article on Python 3?
- From: Paul Rubin
- Re: Misleading wikipedia article on Python 3?
- From: Istvan Albert
- Re: Misleading wikipedia article on Python 3?
- From: greg
- Re: Misleading wikipedia article on Python 3?
- From: Evan Klitzke
- Misleading wikipedia article on Python 3?
- Prev by Date: Re: Issues of state
- Next by Date: Re: pep 3116 behaviour on non-blocking reads
- Previous by thread: Re: Misleading wikipedia article on Python 3?
- Next by thread: Re: Misleading wikipedia article on Python 3?
- Index(es):
Relevant Pages
|