embed data inside string
Darrell
dgallion1 at yahoo.com
Thu May 16 16:01:03 EDT 2002
If performance matters, concatenation is slower that using format strings.
--Darrell
Julia Bell <julia.bell at jpl.nasa.gov> wrote in message news:<3CE3C0DC.571F2415 at jpl.nasa.gov>...
> Thanks for all of the responses.
>
> I recognize that the formatted strings are just as simple as the example line I gave
> using the concatenation. (I just used the simple example to demonstrate the point).
> My actual application is more complex (lots of escaped characters, combination of
> single and double quotes, etc. - just a messy string to be creating - so I was hoping
> to at least eliminate the parts of the definition that involved leaving the quoted
> portion to evaluate the parameter).
>
> But, from the responses it looks like the concatenation I'm using is probably the
> easiest way to go.
>
> Thanks for the suggestions.
>
> Julia Bell
>
More information about the Python-list
mailing list