def sort_items(self,items,args=False):
if self.settings['<STR_LIT>'].lower() == '<STR_LIT:src>': return<EOL>def alpha(i):<EOL><INDENT>return i.name<EOL><DEDENT>def permission(i):<EOL><INDENT>if args:<EOL><INDENT>if i.intent == '<STR_LIT>': return '<STR_LIT:b>'<EOL>if i.intent == '<STR_LIT>': return '<STR_LIT:c>'<EOL>if i.intent == '<STR_LIT>': return '<STR_LIT:d>'<EOL>if i.intent == '<STR_LIT>': return '<STR_LIT:e>'<EOL><DEDENT>perm = getattr(i, '<STR_LIT>', '<STR_LIT>')<EOL>if perm == '<STR_LIT>': return '<STR_LIT:b>'<EOL>if perm == '<STR_LIT>': return '<STR_LIT:c>'<EOL>if perm == '<STR_LIT>': return '<STR_LIT:d>'<EOL>return '<STR_LIT:a>'<EOL><DEDENT>def permission_alpha(i):<EOL><INDENT>return permission(i) + '<STR_LIT:->' + i.name<EOL><DEDENT>def itype(i):<EOL><INDENT>if i.obj == '<STR_LIT>':<EOL><INDENT>retstr = i.vartype<EOL>if retstr == '<STR_LIT:class>': retstr = '<STR_LIT:type>'<EOL>if i.kind: retstr = retstr + '<STR_LIT:->' + str(i.kind)<EOL>if i.strlen: retstr = retstr + '<STR_LIT:->' + str(i.strlen)<EOL>if i.proto:<EOL><INDENT>retstr = retstr + '<STR_LIT:->' + i.proto[<NUM_LIT:0>]<EOL><DEDENT>return retstr<EOL><DEDENT>elif i.obj == '<STR_LIT>':<EOL><INDENT>if i.proctype != '<STR_LIT>':<EOL><INDENT>return i.proctype.lower()<EOL><DEDENT>else:<EOL><INDENT>return i.proctype.lower() + '<STR_LIT:->' + itype(i.retvar)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>return i.obj<EOL><DEDENT><DEDENT>def itype_alpha(i):<EOL><INDENT>return itype(i) + '<STR_LIT:->' + i.name<EOL><DEDENT>if self.settings['<STR_LIT>'].lower() == '<STR_LIT>':<EOL><INDENT>items.sort(key=alpha)<EOL><DEDENT>elif self.settings['<STR_LIT>'].lower() == '<STR_LIT>':<EOL><INDENT>items.sort(key=permission)<EOL><DEDENT>elif self.settings['<STR_LIT>'].lower() == '<STR_LIT>':<EOL><INDENT>items.sort(key=permission_alpha)<EOL><DEDENT>elif self.settings['<STR_LIT>'].lower() == '<STR_LIT:type>':<EOL><INDENT>items.sort(key=itype)<EOL><DEDENT>elif self.settings['<STR_LIT>'].lower() == '<STR_LIT>':<EOL><INDENT>items.sort(key=itype_alpha)<EOL><DEDENT>
Sort the `self`'s contents, as contained in the list `items` as
specified in `self`'s meta-data.