mirror of
https://github.com/python/cpython.git
synced 2025-08-30 05:35:08 +00:00
DECREF pi and e after inserting in symbol table.
This commit is contained in:
parent
3304975647
commit
eb38d2411c
1 changed files with 4 additions and 2 deletions
|
@ -153,6 +153,8 @@ initmath()
|
|||
|
||||
m = initmodule("math", math_methods);
|
||||
d = getmoduledict(m);
|
||||
dictinsert(d, "pi", newfloatobject(atan(1.0) * 4.0));
|
||||
dictinsert(d, "e", newfloatobject(exp(1.0)));
|
||||
dictinsert(d, "pi", v = newfloatobject(atan(1.0) * 4.0));
|
||||
DECREF(v);
|
||||
dictinsert(d, "e", v = newfloatobject(exp(1.0)));
|
||||
DECREF(v);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue