danielgtaylor / python-betterproto

Clean, modern, Python 3.6+ code generator & library for Protobuf 3 and async gRPC
MIT License
1.56k stars 218 forks source link

Simplifying the getattribute mechanism #631

Open AdrienVannson opened 1 month ago

AdrienVannson commented 1 month ago

Summary

Hello,

I have a suggestion that I can probably implement myself if you agree to do it. However, I would like to have your opinion on it before working on it.

Currently, messages redefine their getattribute function. This is used for two reasons:

However, this mechanism has several important issues, and some of them cannot be fixed without switching to a different method:

What do you think?