Setting p.v to None is just a convention. I don't think that any other part of Leo depends on this convention except p.__bool__
It would be trivial to change p.__bool__ implementation for example: instead of: return self.v is not None, we could have return self._valid. And then instead of setting self.v = None, just: self._valid = False. This would remove mypy complains, although I am not sure if it is really necessary. The only thing that needs to be dealt with is searching for tests p.v is None or p.v is not None, but I doubt that there are many such places. > All comments welcome. I would especially like to know how leojs handles > this issue. > > Edward > -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/38b88f9d-9a1f-4c68-8fc2-fdcb9f31009en%40googlegroups.com.
