Re: Shell script or Perl?
On Fri, Jun 13, 2003 at 03:36:54AM -0700, Steve Lamb wrote:
> On Fri, 13 Jun 2003 09:37:36 +0100
> Colin Watson <firstname.lastname@example.org> wrote:
> > I have to say that I can never remember whether Python's print includes
> > a trailing newline, and I find it much more obvious when that's spelt
> > out explicitly as it is in Perl ...
> > Language features can be idioms too. :)
> I don't call that a feature. That's one of the few Pythonisms I
> consider a bug. It's a holdout from the Pascal days of Write and
Yeah, it reminded me of that ...
> For the record, it does unless there is a trailing comma.
And then it prints a space between the objects (which is documented), or
if it's the last thing in the script it prints a newline anyway (which
isn't documented as far as I can see). Ugh. I guess you have to use
sys.stdout.write() for sane I/O.
Colin Watson [email@example.com]