Replies: 2 comments 6 replies
-
When you do a subclass, you can call any method of the superclass. What are you trying to achieve? |
Beta Was this translation helpful? Give feedback.
-
@GEAG I suggest you read the Berry documentation avec class inheritance: https://berry.readthedocs.io/en/latest/source/en/Chapter-6.html#class-inheritance If you want a full and non-trivial example of overloading Finally, a more general question is whether you need inheritance or composition. The example you mention about parsing PPP traffic may be better served with composition (a class containing |
Beta Was this translation helpful? Give feedback.
-
Hi
It's unclear to me how from within an object of a subclass of class bytes, the methods of class bytes can be used correctly ?
Ex:
I am not sure, that assigning (=) something to self or subscripts on self are working as intended?
It doesn't seem that the following would also be possible?
var head = sub[0..2]
Or should that work correctly?
How about this:
sub[0] = 0x77
Should that work too?
Thanks for your help in advance.
Beta Was this translation helpful? Give feedback.
All reactions