python Function instance: remove duplicate code
This commit is contained in:
parent
988eb6ac9d
commit
887f1a1d38
|
@ -1634,8 +1634,8 @@ class Function(PyobjMixin, nodes.Item):
|
||||||
try:
|
try:
|
||||||
return self._instance
|
return self._instance
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
|
# Each Function gets a fresh class instance.
|
||||||
self._instance = self._getinstance()
|
self._instance = self._getinstance()
|
||||||
|
|
||||||
return self._instance
|
return self._instance
|
||||||
|
|
||||||
def _getinstance(self) -> Any | None:
|
def _getinstance(self) -> Any | None:
|
||||||
|
|
Loading…
Reference in New Issue