# HG changeset patch
# User Simon King <simon.king@uni-jena.de>
# Date 1241334774 25200
# Node ID f53f3612786ad4df71a5a4f91ae7e06a60dcf590
# Parent cc20d511077bc6d4c223d10f9205942be7fbd68f
Introducing weak references in PolynomialRing constructor
diff -r cc20d511077b -r f53f3612786a sage/rings/polynomial/polynomial_ring_constructor.py
a
|
b
|
|
36 | 36 | from sage.rings.integer import Integer |
37 | 37 | from sage.rings.integer_mod_ring import is_IntegerModRing |
38 | 38 | |
39 | | _cache = {} |
| 39 | from weakref import WeakValueDictionary |
| 40 | _cache = WeakValueDictionary({}) |
40 | 41 | |
41 | 42 | def PolynomialRing(base_ring, arg1=None, arg2=None, |
42 | 43 | sparse=False, order='degrevlex', |