Project

General

Profile

« Previous | Next » 

Revision 2582

strings.py: repr_no_u(): Fixed bug where "u" prefix was removed even in reprs of non-strings

View differences:

strings.py
58 58

  
59 59
def repr_no_u(value):
60 60
    '''Like built-in repr() but removes the "u" in `u'...'`'''
61
    return remove_prefix('u', repr(value))
61
    return re.sub(r"^u(?=')", r'', repr(value))
62 62

  
63 63
##### Line endings
64 64

  

Also available in: Unified diff