Unable to strip \n characters

Asun Friere afriere at yahoo.co.uk
Wed May 23 03:23:50 EDT 2007


On May 22, 6:37 am, aiwarrior <zube... at yahoo.com.br> wrote:
> On May 21, 7:05 am, Asun Friere <afri... at yahoo.co.uk> wrote:
>
> > On May 20, 10:49 pm, Michael Bentley <mich... at jedimindworks.com>
> > wrote:
>
> > > On May 20, 2007, at 7:41 AM, Michael Bentley wrote:
>
> > > > (upload.strip())
>
> > > Oops: (upload.strip(),) or upload.strip()
>
> > Superfluous though the braces around your original were, it should
> > still run ...
> > ie. (a) == a
>
> When you mean superfluous you mean it makes a diffrence in run-time or
> just code style?


Hmm I thought I already answered, but it hasn't turned up so ...

It is superfluous in both senses, ie it will (v. marginally) affect
run-time performance, and it is generally considered good coding style
not to include parentheses where they are not needed, (though one
should not be absolute about this, there may be cases where
superfluous parentheses greatly clarify the meaning of some code).




More information about the Python-list mailing list