. Python 2.1 function attributes

Alex Martelli aleaxit at yahoo.com
Tue Jan 30 03:30:32 EST 2001


"Moshe Zadka" <moshez at zadka.site.co.il> wrote in message
news:mailman.980839836.29137.python-list at python.org...
    [snip]
> print >>sys.stderr, "danger will robinson! number", n
>
> (How many Python programmers preferred to write to stdout that warning
> because print was too conveinient? You'll never know...)

To quote an unnamed Pythonbot (but he knows who he is...), "printed
to stdout (why not stderr? because stderr is a lame hack <0.2 wink>)"
[from the docstring of a simple AND very useful unit-test framework].

Of course, I guess the new politically correct line is that stderr
is now a precious and brilliant concept, and so is 'print>>' since
it lets you so smoothly access such a pearl beyond price.  Yeah,
right.  Fortunately, I can keep print>>-free version 0.9.4 around --
hooray for open source.


> I was originally against print>>, but the rather weak arguments people
> manage to come up to denounce it (with the exception of Alex, who reported
> a use case) have turned me about...

Thanks for singling me out, but I notice with interest that such
exception from "rather weak-hood" makes no actual difference to
your opinions.  Such case studies in "how do human beings actually
make up their minds" (as opposed to, *rationalize* the opinions they
"want" to hold) hold some fascination for me.

As a matter of theory, that is.

If I were a marketeer, or a politician, I guess I would be studying
how to turn such mechanisms to my advantage and exploit them for
leverage on "selling my wares" (a field of very rewarding and
pragmatical study that has no doubt been going on for millennia; it
can be, and has been, argued, that such issues have been the prime
sources of selective evolutionary pressure for human intelligence --
to sell somebody a bill of goods, and to avoid being sold one).

As it happens, my quality of life would show little substantial
improvement were people to start behaving sensibly (defined as,
behaving as _I_ opine would be best:-) in most areas (and the
ones that matter, such as dealing with this planet's environment
with some pragmatical respect, appear to be beyond any individual's
ability to influence much).  So, I can pursue more entertaining
courses -- a philosopher's sad smile on human folly, a biologist's
just-so-story about why such behavior is adaptive, an economist's
tale on why it maximizes utility, a mystic's myth on how this all
leads to greater spiritual good, whatever:-).


Alex







More information about the Python-list mailing list