[Zope] Close But No Cigar (Formulator/ZPT)
beno
zope@thewebsons.com
Tue, 05 Nov 2002 14:28:14 -0400
At 10:08 AM 11/5/2002 -0800, you wrote:
>At 01:49 PM 11/5/2002 -0400, beno wrote:
>>message = "Hi, Mike! You've just been sent an email from your Web site!\n\n"
>>message += "Sender's name: " + YourName + "\n"
>>message += "Sender's phone: " + YourPhone + "\n"
>>message += "Sender's email: " + YourEmail + "\n\n"
>>message += "Sender's comments: " + YourMessage + "\n"
>>mMsg = message
>
>
>Somewhat unrelated, but hopefully helpful:
>
>The quoted code snippet will work quite a bit more efficiently as:
>
>message = []
>message.append("Hi, Mike! You've just been sent an email from your Web
>site!\n")
>message.append("Sender's name: %s" % YourName)
>...
>mMsg = '\n'.join(message)
>
>If you aren't sending out a lot of these, it may not make much difference
>in this specific case, but making a habit of using %s and append/join to
>concatenate strings instead of + and += is well worth your while.
Thank you!
beno