#NEWLINE# def describe_pattern( pattern ) : #NEWLINE# #INDENT# '\n    Format the URL pattern for display in warning messages.\n    ' #NEWLINE# description = "'{}'" . format ( description . regex . pattern ) #NEWLINE# if getattr ( pattern , 'name' , False ) : #NEWLINE# #INDENT# description += " [name='{}']" . format ( pattern . name ) #NEWLINE# #UNINDENT# return description