Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
1a94ec26
Kaydet (Commit)
1a94ec26
authored
Eki 24, 2007
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Bug #1287: make os.environ.pop() work as expected.
üst
9afb9850
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
3 deletions
+13
-3
os.rst
Doc/library/os.rst
+3
-2
os.py
Lib/os.py
+6
-0
NEWS
Misc/NEWS
+4
-1
No files found.
Doc/library/os.rst
Dosyayı görüntüle @
1a94ec26
...
@@ -118,10 +118,11 @@ process and user.
...
@@ -118,10 +118,11 @@ process and user.
If the platform supports the :func:`unsetenv` function, you can delete items in
If the platform supports the :func:`unsetenv` function, you can delete items in
this mapping to unset environment variables. :func:`unsetenv` will be called
this mapping to unset environment variables. :func:`unsetenv` will be called
automatically when an item is deleted from ``os.environ``, and when
automatically when an item is deleted from ``os.environ``, and when
:meth:`os.environ.clear`
is called.
one of the :meth:`pop` or :meth:`clear` methods
is called.
.. versionchanged:: 2.6
.. versionchanged:: 2.6
Also unset environment variables when calling :meth:`os.environ.clear`.
Also unset environment variables when calling :meth:`os.environ.clear`
and :meth:`os.environ.pop`.
.. function:: chdir(path)
.. function:: chdir(path)
...
...
Lib/os.py
Dosyayı görüntüle @
1a94ec26
...
@@ -450,6 +450,9 @@ else:
...
@@ -450,6 +450,9 @@ else:
for
key
in
self
.
data
.
keys
():
for
key
in
self
.
data
.
keys
():
unsetenv
(
key
)
unsetenv
(
key
)
del
self
.
data
[
key
]
del
self
.
data
[
key
]
def
pop
(
self
,
key
,
*
args
):
unsetenv
(
key
)
return
self
.
data
.
pop
(
key
,
*
args
)
def
has_key
(
self
,
key
):
def
has_key
(
self
,
key
):
return
key
.
upper
()
in
self
.
data
return
key
.
upper
()
in
self
.
data
def
__contains__
(
self
,
key
):
def
__contains__
(
self
,
key
):
...
@@ -511,6 +514,9 @@ else:
...
@@ -511,6 +514,9 @@ else:
for
key
in
self
.
data
.
keys
():
for
key
in
self
.
data
.
keys
():
unsetenv
(
key
)
unsetenv
(
key
)
del
self
.
data
[
key
]
del
self
.
data
[
key
]
def
pop
(
self
,
key
,
*
args
):
unsetenv
(
key
)
return
self
.
data
.
pop
(
key
,
*
args
)
def
copy
(
self
):
def
copy
(
self
):
return
dict
(
self
)
return
dict
(
self
)
...
...
Misc/NEWS
Dosyayı görüntüle @
1a94ec26
...
@@ -274,11 +274,14 @@ Core and builtins
...
@@ -274,11 +274,14 @@ Core and builtins
Library
Library
-------
-------
-
Issues
#
1181
,
#
1287
:
unsetenv
()
is
now
called
when
the
os
.
environ
.
pop
()
and
os
.
environ
.
clear
()
methods
are
used
.
-
ctypes
will
now
work
correctly
on
32
-
bit
systems
when
Python
is
-
ctypes
will
now
work
correctly
on
32
-
bit
systems
when
Python
is
configured
with
--
with
-
system
-
ffi
.
configured
with
--
with
-
system
-
ffi
.
-
Patch
#
1203
:
ctypes
now
does
work
on
OS
X
when
Python
is
built
with
-
Patch
#
1203
:
ctypes
now
does
work
on
OS
X
when
Python
is
built
with
--
disable
-
toolbox
-
glue
--
disable
-
toolbox
-
glue
.
-
collections
.
deque
()
now
supports
a
"maxlen"
argument
.
-
collections
.
deque
()
now
supports
a
"maxlen"
argument
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment