NM.Range¶
Fields¶
None
Methods¶
class |
|
class |
|
|
|
|
|
|
|
|
|
|
Details¶
- class NM.Range¶
- classmethod from_str(str)¶
- Parameters:
str (
str
) – the string representation of a range- Raises:
- Returns:
- Return type:
Parses the string representation of the range to create a
NM.Range
instance.New in version 1.42.
- classmethod new(start, end)¶
- Parameters:
- Returns:
the new
NM.Range
object.- Return type:
Creates a new
NM.Range
object for the given range. Setting end equal to start creates a single-element range.New in version 1.42.
- cmp(b)¶
- Parameters:
- Returns:
zero if the two instances are equivalent or a non-zero integer otherwise. This defines a total ordering over the ranges.
- Return type:
Compare two ranges.
New in version 1.42.
- get_range()¶
- Returns:
True
if the range contains more than one element,False
otherwise.- start:
location to store the start value
- end:
location to store the end value
- Return type:
Gets the start and end values for the range.
New in version 1.42.
- ref()¶
- Returns:
the input argument self object.
- Return type:
Increases the reference count of the object. This is thread-safe.
New in version 1.42.
- to_str()¶
- Returns:
a string representing the range.
- Return type:
Convert a
NM.Range
to a string.New in version 1.42.
- unref()¶
Decreases the reference count of the object. If the reference count reaches zero the object will be destroyed. This is thread-safe.
New in version 1.42.