Expressions use multiple inheritance for Constant, Variable, Operation#2396
Expressions use multiple inheritance for Constant, Variable, Operation#2396
Conversation
ehennenfent
left a comment
There was a problem hiding this comment.
I don't see any code problems with this PR, and I think the technique of dynamically creating __slots__ for multiply-inherited subclasses is really exciting. That said, since this more or less completely reverts #1635, I'd like to get your thoughts on a couple of matters:
First, changing the inheritance structure reduces the amount of duplicated code, but means we have to do things like the __xslots__ trick to get good performance. Are we certain the ergonomics of one approach are better than the other?
Second, how much does this change affect performance? #1635 gave us a modest improvement, but not large enough to be noticeable without measuring, so we should measure this branch as well to see how it stacks up.
85f0fa2 to
d65be27
Compare
45bd7b9 to
8135735
Compare
|
After testing with I think the |
More minimal PR after breaking it out of #1729
Removes some duplicate code
NOTE: This branch will be rebased onto
masterafterexpression-keyword-only-initbranch/PR #2395 is merged