-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Direct access to attributes #5
Comments
Protoc compiler does not generate a class but a metaclass, we cannot just inherit from it. If we want to have our own class, we need to use composition instead. Direct access to attributes don't seem possible and initialization via kwargs is complex, because you can have an atribute that is a list of attributes that contain other types and lists. It might be doable but I'm not sure that the time investment is proportional to the benefits. |
I will try to cook something, if devil is on the details I might fail but
we'll give it a try. please keep the issue open for now
…On Jun 12, 2017 3:26 PM, "marblestation" ***@***.***> wrote:
Protoc compiler does not generate a class but a metaclass, we cannot just
inherit from it. If we want to have our own class, we need to use
composition instead.
Direct access to attributes don't seem possible and initialization via
kwargs is complex, because you can have an atribute that is a list of
attributes that contain other types and lists. It might be doable but I'm
not sure that the time investment is proportional to the benefits.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#5 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAZIkmO9M9pWpgFrrk6fsI7n0shHApnWks5sDY-ugaJpZM4N1x9r>
.
|
It addresses one small aspect of #5.
so I was expecting the following to work:
r = BibRecord()
r.bibcode = 'foo'
r.serialize()
i doesn't because Msg is storing things in r._data
Also, it would be really really useful to be able to do:
The text was updated successfully, but these errors were encountered: