operators

Operator

class versions.operators.Operator(func, string)[source]

A package version constraint operator.

Parameters:
  • func (callable) – The operator callable.
  • string (str) – The operator string representation.
classmethod parse(string)[source]

Parses string and returns an Operator object.

Raises :InvalidOperator If string is not a valid operator.

Valid operators are ==, !=, <, >, <=, and >=.

InvalidOperator

exception versions.operators.InvalidOperator(operator)[source]

Raised when failing to parse an operator.

operator = None

The bogus operator.

Table Of Contents

Previous topic

constraints

Next topic

packages