allow the call to len on Value proxy.
authorLisa Hsu <hsul@eecs.umich.edu>
Thu, 17 Mar 2005 19:31:08 +0000 (14:31 -0500)
committerLisa Hsu <hsul@eecs.umich.edu>
Thu, 17 Mar 2005 19:31:08 +0000 (14:31 -0500)
--HG--
extra : convert_revision : 1a0aaf8db5ef60e0e7fc053bf4605eb90bb6e9e0

python/m5/config.py

index e6ad5a0ba5a1edb60b55c8283642b4bf1c32d438..bb880cd2962a8c7bf099736d53a706368e073e03 100644 (file)
@@ -895,6 +895,9 @@ class Value(object):
     def __str__(self):
         return str(self._getattr())
 
+    def __len__(self):
+        return len(self._getattr())
+
 # Regular parameter.
 class _Param(object):
     def __init__(self, ptype, *args, **kwargs):