update public distribution
based on internal repository c9a2ac8 2019-01-03 16:04:57 +0100 tagged rev-master-2.0.0
This commit is contained in:
@ -1,4 +1,20 @@
|
||||
class BraceMessage:
|
||||
"""
|
||||
@package pmsco.helpers
|
||||
helper classes
|
||||
|
||||
a collection of small and generic code bits mostly collected from the www.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class BraceMessage(object):
|
||||
"""
|
||||
a string formatting proxy class useful for logging and exceptions.
|
||||
|
||||
use BraceMessage("{0} {1}", "formatted", "message")
|
||||
in place of "{0} {1}".format("formatted", "message").
|
||||
the advantage is that the format method is called only if the string is actually used.
|
||||
"""
|
||||
def __init__(self, fmt, *args, **kwargs):
|
||||
self.fmt = fmt
|
||||
self.args = args
|
||||
|
Reference in New Issue
Block a user