Package zeroinstall :: Package injector :: Module model :: Class VersionExpressionRestriction
[frames] | no frames]

Class VersionExpressionRestriction

source code

 object --+    
          |    
Restriction --+
              |
             VersionExpressionRestriction

Only versions for which the expression is true are acceptable.


Since: 1.13

Instance Methods
 
__init__(self, expr)
Constructor.
source code
bool
meets_restriction(self, impl)
Called by the solver.Solver to check whether a particular implementation is acceptable.
source code
str
__str__(self)
str(x)
source code

Inherited from Restriction: __repr__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Class Variables

Inherited from Restriction: reason

Properties

Inherited from object: __class__

Method Details

__init__(self, expr)
(Constructor)

source code 

Constructor.

Parameters:
  • expr (str) - the expression, in the form "2.6..!3 | 3.2.2.."
Overrides: object.__init__

meets_restriction(self, impl)

source code 

Called by the solver.Solver to check whether a particular implementation is acceptable.

Parameters:
Returns: bool
False if this implementation is not a possibility
Overrides: Restriction.meets_restriction

__str__(self)
(Informal representation operator)

source code 

str(x)

Returns: str
Overrides: object.__str__