try: # this needs to be a command that fails if we aren't in a git repo
gitfunc("rev-parse", "--show-toplevel") except (subprocess.CalledProcessError, OSError): returnNone else: return gitfunc
# we can unconditionally assign as next time this won't be called assert self.name notin obj.__dict__
rv = obj.__dict__[self.name] = self.func(obj)
obj.__dict__.setdefault("__cached_properties__", set()).add(self.name) return rv
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.