operators

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

A package version constraint operator.

Parameters:
  • func (callable) – The operator callable.
  • string (str) – The operator string representation.
func = None

Operator callable

string = None

Operator string representation

classmethod parse(string)[source]

Parses string and returns an Operator object.

Raises:InvalidOperatorExpression If string is not a valid operator.

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

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

Raised when failing to parse an operator.

operator = None

The bogus operator.

Previous topic

repositories

Next topic

errors