# HG changeset patch
# User Simon King <simon.king@uni-jena.de>
# Date 1301484257 -7200
# Node ID b957652c17d644d79f968f32643615ea46f6c217
# Parent be909039b9bb942c18344254ba8bfe7495836924
#9944: Call Parent.__init__ during initialization of a ring.
diff -r be909039b9bb -r b957652c17d6 sage/rings/ring.pyx
a
|
b
|
|
72 | 72 | """ |
73 | 73 | Generic ring class. |
74 | 74 | """ |
| 75 | # Unfortunately, ParentWithGens inherits from sage.structure.parent_old.Parent. |
| 76 | # Its __init__ method does *not* call Parent.__init__, since this would somehow |
| 77 | # yield an infinite recursion. But when we call it from here, it works. |
| 78 | # This is done in order to ensure that __init_extra__ is called. |
| 79 | def __init__(self, base, names=None, normalize=True, category = None): |
| 80 | ParentWithGens.__init__(self, base, names=names, normalize=normalize) |
| 81 | Parent.__init__(self, category=category) |
| 82 | |
75 | 83 | def __iter__(self): |
76 | 84 | r""" |
77 | 85 | Return an iterator through the elements of self. Not implemented in general. |