code: def last(self):
          
          parts = self.uri.split('/')
          if not parts:
              return ''
          if len(parts) > 1:
              if not parts[-1]:
                  return parts[-2]
              else:
                  return parts[-1]
          else:
              return parts[-1]
docs: last: similar to 'basename', but makes sure that the last part is
                really returned.
                example: URI('/some/dir/').basename() will return '' while
                         URI('/some/dir/').last() will return 'dir'.
  
          @return: last part of uri
          @rvalue: str