At the moment T reserves all dunders; you can't access a dunder attribute with a T. Some of these would probably work to open (e.g., __dict__) but others definitely wouldn't (e.g., __class__). So, a method called __ which would help access all dunders.
T.__('dict__') to access __dict__ and so on. It's not perfect, but it could be worse, and I can't think of anything much better. It's very unlikely to collide with any real attributes at the very least.
Also, the error message when a user tries to access a dunder attribute should also be changed to redirect them to use the method.
At the moment
T
reserves all dunders; you can't access a dunder attribute with aT
. Some of these would probably work to open (e.g.,__dict__
) but others definitely wouldn't (e.g.,__class__
). So, a method called__
which would help access all dunders.T.__('dict__')
to access__dict__
and so on. It's not perfect, but it could be worse, and I can't think of anything much better. It's very unlikely to collide with any real attributes at the very least.Also, the error message when a user tries to access a dunder attribute should also be changed to redirect them to use the method.
PS
T.__()
kinda looks like a Hugh aka Third of Five smiley/kaomoji.