X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fbindings%2Fpython%2Fbt2%2Fbt2%2Fobject.py;fp=src%2Fbindings%2Fpython%2Fbt2%2Fbt2%2Fobject.py;h=290f3febe5b3368da05f86501af635764e3d5ffa;hb=cfbd7cf3bde05e8a6606478889dcd663604ef7b5;hp=f73ec04bb67074573de5ee189e7a07f749c4e748;hpb=e3f7fd922b3dc8fd92ad9397f4f9e175ff843b2a;p=babeltrace.git diff --git a/src/bindings/python/bt2/bt2/object.py b/src/bindings/python/bt2/bt2/object.py index f73ec04b..290f3feb 100644 --- a/src/bindings/python/bt2/bt2/object.py +++ b/src/bindings/python/bt2/bt2/object.py @@ -38,9 +38,9 @@ class _BaseObject: return int(self._ptr) def __repr__(self): - return '<{}.{} object @ {}>'.format(self.__class__.__module__, - self.__class__.__name__, - hex(self.addr)) + return '<{}.{} object @ {}>'.format( + self.__class__.__module__, self.__class__.__name__, hex(self.addr) + ) def __copy__(self): raise NotImplementedError @@ -58,6 +58,7 @@ class _BaseObject: # of unique objects, we make it so acquiring a reference on a unique object # acquires a reference on its owner. + class _UniqueObject(_BaseObject): # Create a _UniqueObject. @@ -69,8 +70,7 @@ class _UniqueObject(_BaseObject): # - owner_put_ref: Callback to put a reference on the owner. @classmethod - def _create_from_ptr_and_get_ref(cls, ptr, owner_ptr, - owner_get_ref, owner_put_ref): + def _create_from_ptr_and_get_ref(cls, ptr, owner_ptr, owner_get_ref, owner_put_ref): obj = cls.__new__(cls) obj._ptr = ptr