A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2015-April/138989.html below:

[Python-Dev] PEP 487 vs 422 (dynamic class decoration)

[Python-Dev] PEP 487 vs 422 (dynamic class decoration) [Python-Dev] PEP 487 vs 422 (dynamic class decoration)Greg Ewing greg.ewing at canterbury.ac.nz
Fri Apr 3 04:29:31 CEST 2015
On 04/03/2015 02:31 PM, Nick Coghlan wrote:
> If I'm understanding PJE's main concern correctly it's that this
> approach requires explicitly testing that the decorator has been
> applied correctly in your automated tests every time you use it, as
> otherwise there's a risk of a silent failure when you use the
> decorator but omit the mandatory base class that makes the decorator
> work correctly.

Could the decorator be designed to detect that situation
somehow? E.g. the first time the decorated method is called,
check that the required base class is present.

-- 
Greg

More information about the Python-Dev mailing list

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