- User Since
- Jul 1 2017, 5:02 PM (37 w, 6 d)
I'm happy with this feature.
I still don't have a good suggestion for a better name. We can always change terminology later.
Thu, Mar 22
This was just an RFC. It doesn't need to be an open review.
This needs rebasing. Please hold off reviewing.
I'll rebase this on top of zope.interface (D2928 and friends). Please defer reviewing for now.
Wed, Mar 21
Yes. I folded this in to previous commits and hg phabsend wasn't smart enough to realize it.
__slots__ allocates enough space for the exact set of attributes specified rather than backing object instances by __dict__. If you create thousands of small objects that all have the same fields, __slots__ can yield some performance wins.
I like the functionality. I'm not crazy about "hoist." I think if the config option were named hoistedpeer, that would be a bit better. If it is just hoist, it sounds like it should be a boolean.
Very nice cleanup!
The ability to register extra functions seems like the important functionality here. And self.extrafns is preserved. So I don't think anyone will miss the old function.
This was hard to review. But I didn't see anything obviously wrong with this refactor.
I wonder if it is worth creating a dedicated type to represent the fields in a commit. We have a handful of these functions around the code base where you need to pass around a bunch of values as a unit. But that would be follow-up fodder.