From 7ba16b49e00eefbc53d0854b244509c59525e59b Mon Sep 17 00:00:00 2001 From: Collin Winter Date: Tue, 1 May 2007 19:08:28 +0000 Subject: [PATCH] Add an additional motivation for class decorators. --- pep-3129.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pep-3129.txt b/pep-3129.txt index e996512cd..874ebd1b3 100644 --- a/pep-3129.txt +++ b/pep-3129.txt @@ -33,10 +33,12 @@ The motivating use-case was to make certain constructs more easily expressed and less reliant on implementation details of the CPython interpreter. While it is possible to express class decorator-like functionality using metaclasses, the results are generally -unpleasant and the implementation highly fragile [#motivation]_. The -fact that large-scale Python projects like Zope were going through -these wild contortions to achieve something like class decorators won -over the BDFL. +unpleasant and the implementation highly fragile [#motivation]_. In +addition, metaclasses are inherited, whereas class decorators are not, +making metaclasses unsuitable for some, single class-specific uses of +class decorators. The fact that large-scale Python projects like Zope +were going through these wild contortions to achieve something like +class decorators won over the BDFL. Semantics