On Tue, 2011-04-19 at 02:16 +, Steven D'Aprano wrote:
> On Tue, 19 Apr 2011 10:34:27 +1000, James Mills wrote:
>
> > Normally it's considered bad practise to concatenate strings.
>
> *Repeatedly*.
>
> There's nothing wrong with concatenating (say) two or three strings.
> What's a bad idea
On Tue, Apr 19, 2011 at 12:16 PM, Steven D'Aprano
wrote:
> See Joel on Software for more:
>
> http://www.joelonsoftware.com/articles/fog000319.html
The bulk of that article is reasonable; he's right in that a good
programmer MUST have at least some understanding of what's happening
on the low
On Mon, Apr 18, 2011 at 6:23 PM, Benjamin Kaplan
wrote:
> On Mon, Apr 18, 2011 at 8:58 PM, Westley Martínez wrote:
>> On Tue, 2011-04-19 at 10:34 +1000, James Mills wrote:
>>> On Tue, Apr 19, 2011 at 10:17 AM, Rance Hall wrote:
>>> > pseudo code:
>>> >
>>> >
>>> > message = "Bah."
>>> >
>>> > if
On Tue, 19 Apr 2011 10:34:27 +1000, James Mills wrote:
> Normally it's considered bad practise to concatenate strings.
*Repeatedly*.
There's nothing wrong with concatenating (say) two or three strings.
What's a bad idea is something like:
s = ''
while condition:
s += "append stuff to end
On Mon, 2011-04-18 at 21:23 -0400, Benjamin Kaplan wrote:
> message = "%s %s" % (message, " Humbug!")
fix'd
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, Apr 18, 2011 at 8:58 PM, Westley Martínez wrote:
> On Tue, 2011-04-19 at 10:34 +1000, James Mills wrote:
>> On Tue, Apr 19, 2011 at 10:17 AM, Rance Hall wrote:
>> > pseudo code:
>> >
>> >
>> > message = "Bah."
>> >
>> > if test:
>> > message = message + " Humbug!"
>> >
>> > print(messag
On Tue, 2011-04-19 at 10:34 +1000, James Mills wrote:
> On Tue, Apr 19, 2011 at 10:17 AM, Rance Hall wrote:
> > pseudo code:
> >
> >
> > message = "Bah."
> >
> > if test:
> > message = message + " Humbug!"
> >
> > print(message)
> >
> > end pseudo code
>
> Normally it's considered bad practise
On Tue, Apr 19, 2011 at 10:17 AM, Rance Hall wrote:
> pseudo code:
>
>
> message = "Bah."
>
> if test:
> message = message + " Humbug!"
>
> print(message)
>
> end pseudo code
Normally it's considered bad practise to concatenate strings.
Use a a format specifier like this:
> message = "Bah."
>