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
2e8b602a
Kaydet (Commit)
2e8b602a
authored
Şub 08, 2007
tarafından
Martin v. Löwis
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Bug #1653736: Complain about keyword arguments to time.isoformat.
üst
0bafda45
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
2 deletions
+9
-2
test_datetime.py
Lib/test/test_datetime.py
+5
-0
NEWS
Misc/NEWS
+2
-0
datetimemodule.c
Modules/datetimemodule.c
+2
-2
No files found.
Lib/test/test_datetime.py
Dosyayı görüntüle @
2e8b602a
...
...
@@ -1740,6 +1740,11 @@ class TestTime(HarmlessMixedComparison):
self
.
assertEqual
(
t
.
isoformat
(),
"00:00:00.100000"
)
self
.
assertEqual
(
t
.
isoformat
(),
str
(
t
))
def
test_1653736
(
self
):
# verify it doesn't accept extra keyword arguments
t
=
self
.
theclass
(
second
=
1
)
self
.
assertRaises
(
TypeError
,
t
.
isoformat
,
foo
=
3
)
def
test_strftime
(
self
):
t
=
self
.
theclass
(
1
,
2
,
3
,
4
)
self
.
assertEqual
(
t
.
strftime
(
'
%
H
%
M
%
S'
),
"01 02 03"
)
...
...
Misc/NEWS
Dosyayı görüntüle @
2e8b602a
...
...
@@ -105,6 +105,8 @@ Core and builtins
Extension
Modules
-----------------
-
Bug
#
1653736
:
Complain
about
keyword
arguments
to
time
.
isoformat
.
-
operator
.
count
()
now
raises
an
OverflowError
when
the
count
reaches
sys
.
maxint
.
-
Bug
#
1575169
:
operator
.
isSequenceType
()
now
returns
False
for
subclasses
of
dict
.
...
...
Modules/datetimemodule.c
Dosyayı görüntüle @
2e8b602a
...
...
@@ -3167,7 +3167,7 @@ time_str(PyDateTime_Time *self)
}
static
PyObject
*
time_isoformat
(
PyDateTime_Time
*
self
)
time_isoformat
(
PyDateTime_Time
*
self
,
PyObject
*
unused
)
{
char
buf
[
100
];
PyObject
*
result
;
...
...
@@ -3411,7 +3411,7 @@ time_reduce(PyDateTime_Time *self, PyObject *arg)
static
PyMethodDef
time_methods
[]
=
{
{
"isoformat"
,
(
PyCFunction
)
time_isoformat
,
METH_
KEYWORD
S
,
{
"isoformat"
,
(
PyCFunction
)
time_isoformat
,
METH_
NOARG
S
,
PyDoc_STR
(
"Return string in ISO 8601 format, HH:MM:SS[.mmmmmm]"
"[+HH:MM]."
)},
...
...
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