Refs #23919 -- Stopped inheriting from object to define new style classes.

Tests and docs complement to cecc079168.
This commit is contained in:
Mariusz Felisiak 2017-06-26 16:30:31 +02:00 committed by Tim Graham
parent fba0eaa5d6
commit 081e787160
18 changed files with 24 additions and 24 deletions

View file

@ -36,7 +36,7 @@ You only need to know that 52 cards are dealt out equally to four players, who
are traditionally called *north*, *east*, *south* and *west*. Our class looks
something like this::
class Hand(object):
class Hand:
"""A hand of cards (bridge style)"""
def __init__(self, north, east, south, west):

View file

@ -71,7 +71,7 @@ the assembly and transmission of a large CSV file::
from django.http import StreamingHttpResponse
class Echo(object):
class Echo:
"""An object that implements just the write method of the file-like
interface.
"""

View file

@ -42,7 +42,7 @@ method of database routers as ``**hints``:
.. snippet::
:filename: myapp/dbrouters.py
class MyRouter(object):
class MyRouter:
def allow_migrate(self, db, app_label, model_name=None, **hints):
if 'target_db' in hints: