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
0e175a6e
Kaydet (Commit)
0e175a6e
authored
Kas 21, 2016
tarafından
INADA Naoki
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #28532: Show sys.version when -V option is supplied twice
üst
6befb641
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
4 deletions
+13
-4
cmdline.rst
Doc/using/cmdline.rst
+6
-1
test_cmd_line.py
Lib/test/test_cmd_line.py
+1
-1
NEWS
Misc/NEWS
+2
-0
python.man
Misc/python.man
+2
-1
main.c
Modules/main.c
+2
-1
No files found.
Doc/using/cmdline.rst
Dosyayı görüntüle @
0e175a6e
...
...
@@ -180,7 +180,12 @@ Generic options
Print
the
Python
version
number
and
exit
.
Example
output
could
be
::
Python
3.0
Python
3.6.0
b2
+
When
given
twice
,
print
more
information
about
the
build
,
like
::
Python
3.6.0
b2
+
(
3.6
:
84
a3c5003510
+,
Oct
26
2016
,
02
:
33
:
55
)
[
GCC
6.2.0
20161005
]
..
_using
-
on
-
misc
-
options
:
...
...
Lib/test/test_cmd_line.py
Dosyayı görüntüle @
0e175a6e
...
...
@@ -43,7 +43,7 @@ class CmdLineTest(unittest.TestCase):
def
test_version
(
self
):
version
=
(
'Python
%
d.
%
d'
%
sys
.
version_info
[:
2
])
.
encode
(
"ascii"
)
for
switch
in
'-V'
,
'--version'
:
for
switch
in
'-V'
,
'--version'
,
'-VV'
:
rc
,
out
,
err
=
assert_python_ok
(
switch
)
self
.
assertFalse
(
err
.
startswith
(
version
))
self
.
assertTrue
(
out
.
startswith
(
version
))
...
...
Misc/NEWS
Dosyayı görüntüle @
0e175a6e
...
...
@@ -10,6 +10,8 @@ What's New in Python 3.6.0 beta 4
Core and Builtins
-----------------
- Issue #28532: Show sys.version when -V option is supplied twice.
- Issue #28746: Fix the set_inheritable() file descriptor method on platforms
that do not have the ioctl FIOCLEX and FIONCLEX commands.
...
...
Misc/python.man
Dosyayı görüntüle @
0e175a6e
...
...
@@ -194,7 +194,8 @@ searching for a module. Also provides information on module cleanup
at exit.
.TP
.B \-V ", " \-\-version
Prints the Python version number of the executable and exits.
Prints the Python version number of the executable and exits. When given
twice, print more information about the build.
.TP
.BI "\-W " argument
Warning control. Python sometimes prints warning message to
...
...
Modules/main.c
Dosyayı görüntüle @
0e175a6e
...
...
@@ -74,6 +74,7 @@ static const char usage_3[] = "\
-v : verbose (trace import statements); also PYTHONVERBOSE=x
\n
\
can be supplied multiple times to increase verbosity
\n
\
-V : print the Python version number and exit (also --version)
\n
\
when given twice, print more information about the build
\n
\
-W arg : warning control; arg is action:message:category:module:lineno
\n
\
also PYTHONWARNINGS=arg
\n
\
-x : skip first line of source, allowing use of non-Unix forms of #!cmd
\n
\
...
...
@@ -512,7 +513,7 @@ Py_Main(int argc, wchar_t **argv)
return
usage
(
0
,
argv
[
0
]);
if
(
version
)
{
printf
(
"Python %s
\n
"
,
PY_VERSION
);
printf
(
"Python %s
\n
"
,
version
>=
2
?
Py_GetVersion
()
:
PY_VERSION
);
return
0
;
}
...
...
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