def _getExcludedTLSProtocols(oldest, newest):
 versions = list(TLSVersion.iterconstants())
 excludedVersions = [x for x in versions[:versions.index(oldest)]]
 if newest:
  excludedVersions.extend([x for x in versions[versions.index(newest):]])
 return excludedVersions

def _getExcludedTLSProtocols ( oldest , newest ) : versions = list ( TLSVersion . iterconstants ( ) ) excludedVersions = [ x for x in versions [ : versions . index ( oldest ) ] ] if newest : excludedVersions . extend ( [ x for x in versions [ versions . index ( newest ) : ] ] ) return excludedVersions
given a pair of l{tlsversion} constants .