Garrett Cooper wrote:
Hello Python folks,
I have a function where I'd like to prefix a format string via a
`prefix' string. The definition of the base method is as follows:
#START CODE
def print_message(prefix, out_stream, fmt, *args, **kwargs):
""" Print out [prefix]: [message] """
On 2/16/2009 6:50 AM Garrett Cooper apparently wrote:
I was wondering what the proper means was for formatting
strings.
http://docs.python.org/library/string.html#string-formatting
http://docs.python.org/library/string.html#template-strings
http://docs.python.org/library/stdtypes.html#string-
Hello Python folks,
I have a function where I'd like to prefix a format string via a
`prefix' string. The definition of the base method is as follows:
#START CODE
def print_message(prefix, out_stream, fmt, *args, **kwargs):
""" Print out [prefix]: [message] """
message = fmt
if 0