John Hunter <jdhunter at ace.bsd.uchicago.edu> writes: > I have a function that takes a string as an argument. Is there a way > to test whether the caller of this function passed in a raw string > > func(r'\hi mom') # do_x > func('hi mom') # do_y No. Those are just two different ways of writing the same string. It's like asking func(3.0) and func(3.00) to do two separate things.