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

Class VersionRestriction

source code

 object --+    
          |    
Restriction --+
              |
             VersionRestriction

Only select implementations with a particular version number.


Since: 0.40

Instance Methods
 
__init__(self, version)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
bool
meets_restriction(self, impl)
Called by the solver.Solver to check whether a particular implementation is acceptable.
source code
 
__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, version)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • version - the required version number
Overrides: object.__init__

See Also: parse_version; use this to pre-process the version number

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)

Overrides: object.__str__
(inherited documentation)