Re: Misleading wikipedia article on Python 3?



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
.



Relevant Pages

  • Re: [v][Borg] odd behavior
    ... by brave. ... One trivial thing that I found helpful was replacing the max clevel ... of stat gain, the cl = dl rule holds it back more than anything else. ...
    (rec.games.roguelike.angband)
  • Re: Garmin upgrade for etrex Summit
    ... Replacing it with a new Summit wouldn't gain you anything. ... improvements that are in the 3.xx hardware/firmware but not in the 2.xx models. ...
    (sci.geo.satellite-nav)
  • media center vs. tivo?
    ... With respect to TV recording and viewing, what do I lose or gain by replacing a tivo with a media pc? ...
    (microsoft.public.windows.mediacenter)
  • Re: Missing Mouse
    ... > Somehow I have managed to have a working keyboard but no mouse. ... > tried replacing the mouse with spare one - same problem. ...
    (microsoft.public.win2000.general)
  • Missing Mouse
    ... Somehow I have managed to have a working keyboard but no mouse. ... I have tried replacing the mouse with spare one - same problem. ...
    (microsoft.public.win2000.general)