flexstr#
- flexstr(arg, *args, force=True, join='')[source]#
Try converting any object to a “regular” string (i.e.
str
), but proceed if it fails. Note: this function callsrepr()
rather thanstr()
to ensure a more robust representation of objects.- Parameters:
Example:
sc.flexstr(b'foo', 'bar', [1,2]) # Returns 'foobar[1, 2]'
New in version 3.0.0: handle multiple inputs