• R/O
  • SSH

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisiona9fb9b61aa0764d40aa63d0a09056927b43c02cf (tree)
Time2023-08-21 22:57:09
AuthorAlbert Mietus < albert AT mietus DOT nl >
CommiterAlbert Mietus < albert AT mietus DOT nl >

Log Message

Added '_label' option to DebugMixIn

Change Summary

Incremental Difference

diff -r 476674f21fad -r a9fb9b61aa07 CMP_OTHER_LANGUAGES/Sieve_in_rPython/CC/_debug.py
--- a/CMP_OTHER_LANGUAGES/Sieve_in_rPython/CC/_debug.py Mon Aug 21 13:42:29 2023 +0200
+++ b/CMP_OTHER_LANGUAGES/Sieve_in_rPython/CC/_debug.py Mon Aug 21 15:57:09 2023 +0200
@@ -11,9 +11,21 @@
1111 The MixIn has a default one, showing the name attribute.
1212 """
1313
14+ _debug_label="NotSet"
15+
1416 def _debug_(self, name_only=True):
17+ _label = self._debug_label
1518 _id = "<xxx>" if isRP else "0x%x" % id(self)
16- return str(self.__class__.__name__ ) + "(id=%s, " % _id + self._debug_attr_(name_only) + ")"
19+ return (str(self.__class__.__name__ )
20+ + "(id=%s, " % _id
21+ + "_label=%s, " % _label
22+ + self._debug_attr_(name_only)
23+ + ")" )
24+
25+ def _set_label(self, name):
26+ self._debug_label=name
27+ def _get_label(self):
28+ return "" if self._debug_label == DebugMixIn._debug_label else self._debug_label
1729
1830 def _debug_attr_(self, name_only=True):
1931 return "<<attributes to be done>>"