Message280608
Uploaded a patch updated per Nick's comment.
Not opposed to waiting to see if someone is motivated to implement a version in C that supports __slots__, but if that doesn't happen by the Python 3.7 feature deadline, I don't think it should block this proven version.
It also occurred to me that we could probably support __slots__ in pure Python without harming the non-slots case by implementing a fallback cache in the descriptor itself, keyed by instance in a WeakKeyDictionary. I don't love having the behavior differ so much between the slots and non-slots case, but maybe it's better than not supporting slots at all.
Re setting and deleting: under the current patch, if you set or delete a cached property, you set or delete the cached value. I think this is fine and useful behavior, but it could perhaps be added explicitly to the documentation. |
|
Date |
User |
Action |
Args |
2016-11-11 20:25:31 | carljm | set | recipients:
+ carljm, rhettinger, ncoghlan, pitrou, vstinner, pydanny, eric.araujo, alex, r.david.murray, serhiy.storchaka, madison.may, Omer.Katz |
2016-11-11 20:25:31 | carljm | set | messageid: <1478895931.42.0.893669835632.issue21145@psf.upfronthosting.co.za> |
2016-11-11 20:25:31 | carljm | link | issue21145 messages |
2016-11-11 20:25:31 | carljm | create | |
|