def __getattr__(self, tag): # type: (str) -> PCollection # Special methods which may be accessed before the object is # fully constructed (e.g. in unpickling). if tag[:2] == tag[-2:] == '__': return object.__getattr__(self, tag) # type: ignore return self[tag]
def __getattr__(self, attr): if attr == "playlist": return self.getPlaylistFilenames() else: try: return object.__getattr__(self, attr) except AttributeError: raise AttributeError(attr)
def __getattr__(self, name): """Return the attribute of self._impl, or ._impl if it is requested Parameters: ----------- name : string name of the attribute requested Returns: -------- attribute : object the attribute of self._impl for the requested name """ if name == '_impl': return object.__getattr__(self, name) if not (hasattr(self, "_impl") and self._impl): raise AttributeError("Device has no _impl attached") try: return getattr(self._impl, name) except AttributeError: raise AttributeError("Device %s has no attribute \"%s\"" % (self.name, name))
def __getattr__(self, tag): # Special methods which may be accessed before the object is # fully constructed (e.g. in unpickling). if tag[:2] == tag[-2:] == '__': return object.__getattr__(self, tag) return self[tag]