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/2008-July/081103.html below:

Consolidating names and classes in the `unittest` module (updated 2008-07-15)

[Python-Dev] PEP: Consolidating names and classes in the `unittest` module (updated 2008-07-15) [Python-Dev] PEP: Consolidating names and classes in the `unittest` module (updated 2008-07-15)Benjamin Peterson musiccomposition at gmail.com
Tue Jul 15 02:30:42 CEST 2008
On Mon, Jul 14, 2008 at 6:42 PM, Ben Finney <ben+python at benfinney.id.au> wrote:
> Specification
> =============
>
> Use new-style classes throughout
> --------------------------------
>
> The following classes are currently implemented as classic
> ("old-style") classes, with no metaclass.
>
> * ``TestResult``
> * ``TestCase``
> * ``TestSuite``
> * ``TestLoader``
> * ``_WritelnDecorator``
> * ``TextTestRunner``
> * ``TestProgram``
>
> The `unittest` module will gain the following attribute, to set the
> default metaclass for classes in the module and thus make all classes
> in the module part of the new-style type hierarchy::
>
>    __metaclass__ = type

It's already done.

Line 94-95 in unittest.py (trunk):
# All classes defined herein are 'new-style' classes, allowing use of 'super()'
__metaclass__ = type



-- 
Cheers,
Benjamin Peterson
"There's no place like 127.0.0.1."
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