From 1759e1322b07b2d42942d292dd9be8665115819c Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Tue, 9 Dec 2014 19:34:41 -0500 Subject: [PATCH] Python: document writer.EnumerationMapping MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau --- bindings/python/writer.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bindings/python/writer.py b/bindings/python/writer.py index fbcd6875..8e9c79f9 100644 --- a/bindings/python/writer.py +++ b/bindings/python/writer.py @@ -35,10 +35,18 @@ _MAX_UINT64 = 0xFFFFFFFFFFFFFFFF class EnumerationMapping: """ - Enumeration mapping class. start and end values are inclusive. + Mapping from an enumeration label to a range of integers. """ def __init__(self, name, start, end): + """ + Creates an enumeration mapping, where label *name* is mapped to + the [*start*, *end*] range of integers (*end* is included). + + Set *start* and *end* to the same value to create an enumeration + mapping to a single value. + """ + self.name = name self.start = start self.end = end -- 2.34.1