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
f4f8e649
Kaydet (Commit)
f4f8e649
authored
May 07, 2000
tarafından
Greg Ward
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Got rid of some little-used and not-very-useful methods: 'get_option()' and
'get_options()'.
üst
ea79ba93
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
44 deletions
+3
-44
cmd.py
Lib/distutils/cmd.py
+3
-44
No files found.
Lib/distutils/cmd.py
Dosyayı görüntüle @
f4f8e649
...
...
@@ -157,47 +157,6 @@ class Command:
print
msg
# -- Option query/set methods --------------------------------------
def
get_option
(
self
,
option
):
"""Return the value of a single option for this command. Raise
AttributeError if 'option' is not known."""
return
getattr
(
self
,
option
)
def
get_options
(
self
,
*
options
):
"""Return (as a tuple) the values of several options for this
command. Raise AttributeError if any of the options in
'options' are not known."""
values
=
[]
for
opt
in
options
:
values
.
append
(
getattr
(
self
,
opt
))
return
tuple
(
values
)
def
set_option
(
self
,
option
,
value
):
"""Set the value of a single option for this command. Raise
AttributeError if 'option' is not known."""
if
not
hasattr
(
self
,
option
):
raise
AttributeError
,
\
"command '
%
s': no such option '
%
s'"
%
\
(
self
.
get_command_name
(),
option
)
if
value
is
not
None
:
setattr
(
self
,
option
,
value
)
def
set_options
(
self
,
**
optval
):
"""Set the values of several options for this command. Raise
AttributeError if any of the options specified as
keyword arguments are not known."""
for
k
in
optval
.
keys
():
if
optval
[
k
]
is
not
None
:
self
.
set_option
(
k
,
optval
[
k
])
# -- Convenience methods for commands ------------------------------
def
get_command_name
(
self
):
...
...
@@ -228,8 +187,8 @@ class Command:
src_cmd_obj
.
ensure_ready
()
for
(
src_option
,
dst_option
)
in
option_pairs
:
if
getattr
(
self
,
dst_option
)
is
None
:
se
lf
.
set_option
(
dst_option
,
src_cmd_obj
.
get_option
(
src_option
))
se
tattr
(
self
,
dst_option
,
getattr
(
src_cmd_obj
,
src_option
))
def
find_peer
(
self
,
command
,
create
=
1
):
...
...
@@ -247,7 +206,7 @@ class Command:
its 'option' option."""
cmd_obj
=
self
.
find_peer
(
command
)
return
cmd_obj
.
get_option
(
option
)
return
getattr
(
cmd_obj
,
option
)
def
run_peer
(
self
,
command
):
...
...
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