update docstring on add_prefix_to_record_signals
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 25 Jun 2020 09:31:35 +0000 (10:31 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 25 Jun 2020 09:31:35 +0000 (10:31 +0100)
src/nmutil/iocontrol.py

index 2bd78965b063c42d30fcf6fbf20af98bd49c1f11..20bb8d6853654157f667d4b12c10e50acd4b7636 100644 (file)
@@ -74,12 +74,15 @@ class Object:
 
 
 def add_prefix_to_record_signals(prefix, record):
+    """recursively hunt through Records, modifying names to add a prefix
+    """
     for key, val in record.fields.items():
         if isinstance(val, Signal):
             val.name = prefix + val.name
         elif isinstance(val, Record):
             add_prefix_to_record_signals(prefix, val)
 
+
 class RecordObject(Record):
     def __init__(self, layout=None, name=None):
         Record.__init__(self, layout=layout or [], name=name)