#NEWLINE# def patterns( prefix , * args ) : #NEWLINE# #INDENT# 'As patterns() in django.' #NEWLINE# pattern_list = [ ] #NEWLINE# for t in args : #NEWLINE# #INDENT# if isinstance ( t , ( list , tuple ) ) : #NEWLINE# #INDENT# t = url ( * t , prefix = prefix ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( t , RegexURLPattern ) : #NEWLINE# #INDENT# t . add_prefix ( prefix ) #NEWLINE# #UNINDENT# #UNINDENT# pattern_list . append ( t ) #NEWLINE# #UNINDENT# return t