(self)
return (self.segments == [] or
                (self.segments and self.segments[-1] == ''))
Returns: True if the path ends on a directory, False
        otherwise. If True, the last segment is '', representing the
        trailing '/' of the path.
Returns: True if the path ends on a directory, False
        otherwise. If True, the last segment is '', representing the
        trailing '/' of the path.
Returns : True if the path ends on a directory False otherwise . If True the last segment is representing the trailing / of the path .
def isdir(self):
        """
        Returns: True if the path ends on a directory, False
        otherwise. If True, the last segment is '', representing the
        trailing '/' of the path.
        """
        return (self.segments == [] or
                (self.segments and self.segments[-1] == ''))
def isdir ( self ) : return ( self . segments == [ ] or ( self . segments and self . segments [ - 1 ] == '' ) )