On Fri, Apr 3, 2015 at 11:04 AM, Nick Coghlan <ncoghlan at gmail.com> wrote: > Extending the descriptor protocol to include a per-descriptor hook that's > called at class definition time sounds like a potentially nice way to go to > me. While you *could* still use it to arbitrarily mutate the class object, > it's much clearer that's not the intended purpose, so I don't see it as a > major problem. Just to be clear, mutating the class object was never the point for my main use case that needs the PEP 422 feature; it was for method overloads that are called remotely and need to be registered elsewhere. For some of my other use cases, adding metadata to the class is a convenient way to do things, but classes are generally weak-referenceable so the add-on data can be (and often is) stored in a weak-key dictionary rather than placed directly on the class.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4