From 52cc1d838f4fee573e57b5b182d8e5f5db63240f Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Sun, 18 Mar 2007 15:41:51 +0000 Subject: Implement PEP 3115 -- new metaclass syntax and semantics. The compiler package hasn't been updated yet; test_compiler.py fails. Otherwise all tests seem to be passing now. There are no occurrences of __metaclass__ left in the standard library. Docs have not been updated. --- Lib/string.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Lib/string.py') diff --git a/Lib/string.py b/Lib/string.py index 82819360a4..6aafb65c35 100644 --- a/Lib/string.py +++ b/Lib/string.py @@ -119,9 +119,8 @@ class _TemplateMetaclass(type): cls.pattern = _re.compile(pattern, _re.IGNORECASE | _re.VERBOSE) -class Template: +class Template(metaclass=_TemplateMetaclass): """A string class for supporting $-substitutions.""" - __metaclass__ = _TemplateMetaclass delimiter = '$' idpattern = r'[_a-z][_a-z0-9]*' -- cgit v1.2.1