Is there any possibility to use internal instance attributes in the signature of a class in Python3? Or if not, what would be the pythonic way to achieve the same effect. What I am thinking of is a signature like this:
1 class C:
2 def __init__(self, a=self._b):
3 self._b = 1
4 self.a = a
so that I can have a default for a based on some internal attribute _b.
_bbe a (logically constant) class attribute? Otherwise, there's no good answer (just use a sentinel value likeNoneas the default).None& check for that inside the method