mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
SF patch 672098: Three __contains__ implementations
Contributed by Jp Calderone.
This commit is contained in:
parent
61bb35f440
commit
0e449234bf
3 changed files with 7 additions and 0 deletions
|
|
@ -32,6 +32,8 @@ class _Environ:
|
|||
def has_key(self, key):
|
||||
value = riscos.getenv(key)
|
||||
return value<>None
|
||||
def __contains__(self, key):
|
||||
return riscos.getenv(key) is not None
|
||||
def update(self, dict):
|
||||
for k, v in dict.items():
|
||||
riscos.putenv(k, v)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue