Regarding the convention that a leading underscore means that an attribute is private, does this extend to access from other instances of the same class?
For example, would this be considered to break the convention?
class Man:
def __init__(self):
self._willy = random.randint(1,10)
def __gt__(self, other):
return self._willy > other._willy
In principle I don't see why it should be a problem if it is internal to your package, because it does not create any expectation that end-users can do the same, so you are still free to change the implementation later. Is this correct?
Also related to this, would access from outside the class but within the same package be considered acceptable or bad practice?