Re: Use cases for the priority feature
Alberto Valverde <[email protected]> Tue, 17 Aug 2010 23:48:40 +0200
| Newsgroups | gmane.comp.python.peak |
|---|---|
| Message-ID | <[email protected]> |
Hi, Another use-case for the priority feature is when you're extending a framework's generic function (eg: jsonify) and you can't (or don't want to) modify its source to avoid a conflict with the rule you want to register. In this hypothetical case "around" can't be used either since the framework (or another library) already defines an around method. The only way would be to write a more specific rule but this can be tedious and verbose. Cheers, Alberto