Cooperative class tree filtering
Alberto Berti
alberto at metapensiero.it
Tue Oct 31 12:28:16 EDT 2017
Thanks Ian,
>>>>> "Ian" == Ian Kelly <ian.g.kelly at gmail.com> writes:
Ian> On Thu, Oct 12, 2017 at 5:07 PM, Alberto Berti <alberto at metapensiero.it> wrote:
Ian> My initial reaction is: is this really worth it? This seems like an
Ian> awful lot of code and added complexity in order to do away with two
Ian> lines. It's a lot easier to reason about "return
Ian> super().filter(element)" and verify that it does the right thing than
Ian> for the complicated descriptor above.
yes this was also my conclusion, that descriptor is sitting on a branch
of its own and I've yet to decide on it. The fact is that i've many
cases where I need a coperative superclass-subclass method execution and
I was trying to find some other pattern that would fit in ;-)
More information about the Python-list
mailing list