]> Repositories - Adafruit_Blinka-hackapet.git/commitdiff
Commented
authorCefn Hoile <github.com@cefn.com>
Sun, 18 Feb 2018 01:27:59 +0000 (01:27 +0000)
committerCefn Hoile <github.com@cefn.com>
Sun, 18 Feb 2018 01:27:59 +0000 (01:27 +0000)
python/mcp/__init__.py

index d52c0b9cfe635834f58b595fb68d28c85809cb2e..c29025003703c598939431b24f8836b024e5a280 100644 (file)
@@ -1,8 +1,17 @@
-class Enum(object):
+"""Module providing runtime utility objects to support the Micro/CircuitPython api"""
 
+class Enum(object):
+    """
+        Object supporting CircuitPython-style of static symbols
+        as seen with Direction.OUTPUT, Pull.UP
+    """
 
     @classmethod
     def iteritems(cls):
+        """
+            Inspects attributes of the class for instances of the class
+            and returns as key,value pairs mirroring dict#iteritems
+        """
         for key in dir(cls):
             val = getattr(cls, key)
             if type(val) is cls:
@@ -11,8 +20,9 @@ class Enum(object):
 
     def __repr__(self):
         """
-        Assumes instance will be found as attribute of own
-        class. Returns dot-subscripted path to instance
+        Assumes instance will be found as attribute of own class.
+        Returns dot-subscripted path to instance
+        (assuming absolute import of containing package)
         """
         cls = type(self)
         for key in dir(cls):