(dos_name)
return trunk, ext
Return trunk and extension excluding the dot.
Return trunk and extension excluding the dot.
Return trunk and extension excluding the dot .
def dos_splitext(dos_name):
    """Return trunk and extension excluding the dot."""
    # take whatever comes after first dot as extension
    # and whatever comes before first dot as trunk
    # differs from ntpath.splitext:
    # - does not include . in extension; no extension equals ending in .
    # - dotfiles are trunks starting with . in ntpath but extensions here.
    assert isinstance(dos_name, bytes), type(dos_name)
    elements = dos_name.split(b'.', 1)
    if len(elements) == 1:
        trunk, ext = elements[0], b''
    else:
        trunk, ext = elements
    return trunk, ext
def dos_splitext ( dos_name ) : # take whatever comes after first dot as extension # and whatever comes before first dot as trunk # differs from ntpath.splitext: # - does not include . in extension; no extension equals ending in . # - dotfiles are trunks starting with . in ntpath but extensions here. assert isinstance ( dos_name , bytes ) , type ( dos_name ) elements = dos_name . split ( b'.' , 1 ) if len ( elements ) == 1 : trunk , ext = elements [ 0 ] , b'' else : trunk , ext = elements return trunk , ext