mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
mapping(): Remove this function since it does not add anything to the API.
This commit is contained in:
parent
bf43691ccb
commit
9a9d219f07
1 changed files with 1 additions and 8 deletions
|
@ -19,17 +19,10 @@ from _weakref import \
|
||||||
|
|
||||||
ProxyTypes = (ProxyType, CallableProxyType)
|
ProxyTypes = (ProxyType, CallableProxyType)
|
||||||
|
|
||||||
__all__ = ["ref", "mapping", "proxy", "getweakrefcount", "getweakrefs",
|
__all__ = ["ref", "proxy", "getweakrefcount", "getweakrefs",
|
||||||
"WeakKeyDictionary", "ReferenceType", "ProxyType",
|
"WeakKeyDictionary", "ReferenceType", "ProxyType",
|
||||||
"CallableProxyType", "ProxyTypes", "WeakValueDictionary"]
|
"CallableProxyType", "ProxyTypes", "WeakValueDictionary"]
|
||||||
|
|
||||||
def mapping(dict=None,weakkeys=0):
|
|
||||||
if weakkeys:
|
|
||||||
return WeakKeyDictionary(dict)
|
|
||||||
else:
|
|
||||||
return WeakValueDictionary(dict)
|
|
||||||
|
|
||||||
|
|
||||||
class WeakValueDictionary(UserDict.UserDict):
|
class WeakValueDictionary(UserDict.UserDict):
|
||||||
|
|
||||||
# We inherit the constructor without worrying about the input
|
# We inherit the constructor without worrying about the input
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue