Then I read my own words, and a thought hit me: __THERE'S__ a feature I'd
desperately love to see built into Python. Howabout if, by default, the
error message printed when Python exits due to an unhandled exception looked
like a standard Unix error message, after the fashion of perror(3)? If you
want it to send out the full debugging stack trace, perhaps a command-line
arg could restore the current behavior? Maybe -D?
If it doesn't get implemented, I wouldn't whine too loudly; I'd just go
ahead and build a boilerplate that acts that way. But it'd be seriously cool
if the behavior of a trivially-coded, obvious program with no error checking
was also the behavior of a perfect, Unix-issues-conscious program with
complete error checking and conventional error messages!
A couple of years ago, before I mastered Perl, I used to write lots of stuff
in C. I wrote a library, which I called libbent, which was mostly wrappers
around most of the Unix system calls and library routines that I used;
instead of calling fopen(), I'd call efopen(), and so on. These routines
would exit with an error message if anything went wrong, so I didn't need to
code all that tedious error checking into every program I wrote.
One of the things that impresses me the most about Python is that you don't
have to explicitly code those damned tests, it bombs off with a message if
an error occurs and you don't explicitly _do_something_ about it. If that
message were a conventional error message, rather than a stack trace, it'd
make Python awesomely comfortable for all the little scripting jobs that pop
up. I think.