| 1 |
class A: |
| 2 |
"""A class having no __init__, no __new__""" |
| 3 |
|
| 4 |
|
| 5 |
class B: |
| 6 |
"""A class having __init__(no docstring), no __new__""" |
| 7 |
|
| 8 |
def __init__(self): |
| 9 |
pass |
| 10 |
|
| 11 |
|
| 12 |
class C: |
| 13 |
"""A class having __init__, no __new__""" |
| 14 |
|
| 15 |
def __init__(self): |
| 16 |
"""__init__ docstring""" |
| 17 |
|
| 18 |
|
| 19 |
class D: |
| 20 |
"""A class having no __init__, __new__(no docstring)""" |
| 21 |
|
| 22 |
def __new__(cls): |
| 23 |
pass |
| 24 |
|
| 25 |
|
| 26 |
class E: |
| 27 |
"""A class having no __init__, __new__""" |
| 28 |
|
| 29 |
def __new__(cls): |
| 30 |
"""__new__ docstring""" |
| 31 |
|
| 32 |
|
| 33 |
class F: |
| 34 |
"""A class having both __init__ and __new__""" |
| 35 |
|
| 36 |
def __init__(self): |
| 37 |
"""__init__ docstring""" |
| 38 |
|
| 39 |
def __new__(cls): |
| 40 |
"""__new__ docstring""" |
| 41 |
|
| 42 |
|
| 43 |
class G(C): |
| 44 |
"""A class inherits __init__ without docstring.""" |
| 45 |
|
| 46 |
def __init__(self): |
| 47 |
pass |
| 48 |
|
| 49 |
|
| 50 |
class H(E): |
| 51 |
"""A class inherits __new__ without docstring.""" |
| 52 |
|
| 53 |
def __init__(self): |
| 54 |
pass |