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
02556fba
Unverified
Kaydet (Commit)
02556fba
authored
Ock 12, 2018
tarafından
Raymond Hettinger
Kaydeden (comit)
GitHub
Ock 12, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-32467: Let collections.abc.ValuesView inherit from Collection (#5152)
üst
782d6fe4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
4 deletions
+6
-4
collections.abc.rst
Doc/library/collections.abc.rst
+2
-1
_collections_abc.py
Lib/_collections_abc.py
+1
-1
test_collections.py
Lib/test/test_collections.py
+2
-2
2018-01-11-00-33-42.bpo-32467.YVEOv6.rst
...S.d/next/Library/2018-01-11-00-33-42.bpo-32467.YVEOv6.rst
+1
-0
No files found.
Doc/library/collections.abc.rst
Dosyayı görüntüle @
02556fba
...
@@ -87,7 +87,8 @@ ABC Inherits from Abstract Methods Mixin
...
@@ -87,7 +87,8 @@ ABC Inherits from Abstract Methods Mixin
:class:`Set` ``__iter__``
:class:`Set` ``__iter__``
:class:`KeysView` :class:`MappingView`, ``__contains__``,
:class:`KeysView` :class:`MappingView`, ``__contains__``,
:class:`Set` ``__iter__``
:class:`Set` ``__iter__``
:class:`ValuesView` :class:`MappingView` ``__contains__``, ``__iter__``
:class:`ValuesView` :class:`MappingView`, ``__contains__``, ``__iter__``
:class:`Collection`
:class:`Awaitable` ``__await__``
:class:`Awaitable` ``__await__``
:class:`Coroutine` :class:`Awaitable` ``send``, ``throw`` ``close``
:class:`Coroutine` :class:`Awaitable` ``send``, ``throw`` ``close``
:class:`AsyncIterable` ``__aiter__``
:class:`AsyncIterable` ``__aiter__``
...
...
Lib/_collections_abc.py
Dosyayı görüntüle @
02556fba
...
@@ -746,7 +746,7 @@ class ItemsView(MappingView, Set):
...
@@ -746,7 +746,7 @@ class ItemsView(MappingView, Set):
ItemsView
.
register
(
dict_items
)
ItemsView
.
register
(
dict_items
)
class
ValuesView
(
MappingView
):
class
ValuesView
(
MappingView
,
Collection
):
__slots__
=
()
__slots__
=
()
...
...
Lib/test/test_collections.py
Dosyayı görüntüle @
02556fba
...
@@ -843,13 +843,13 @@ class TestOneTrickPonyABCs(ABCTestCase):
...
@@ -843,13 +843,13 @@ class TestOneTrickPonyABCs(ABCTestCase):
self
.
assertFalse
(
issubclass
(
type
(
x
),
Collection
),
repr
(
type
(
x
)))
self
.
assertFalse
(
issubclass
(
type
(
x
),
Collection
),
repr
(
type
(
x
)))
# Check some non-collection iterables
# Check some non-collection iterables
non_col_iterables
=
[
_test_gen
(),
iter
(
b
''
),
iter
(
bytearray
()),
non_col_iterables
=
[
_test_gen
(),
iter
(
b
''
),
iter
(
bytearray
()),
(
x
for
x
in
[])
,
dict
()
.
values
()
]
(
x
for
x
in
[])]
for
x
in
non_col_iterables
:
for
x
in
non_col_iterables
:
self
.
assertNotIsInstance
(
x
,
Collection
)
self
.
assertNotIsInstance
(
x
,
Collection
)
self
.
assertFalse
(
issubclass
(
type
(
x
),
Collection
),
repr
(
type
(
x
)))
self
.
assertFalse
(
issubclass
(
type
(
x
),
Collection
),
repr
(
type
(
x
)))
# Check some collections
# Check some collections
samples
=
[
set
(),
frozenset
(),
dict
(),
bytes
(),
str
(),
tuple
(),
samples
=
[
set
(),
frozenset
(),
dict
(),
bytes
(),
str
(),
tuple
(),
list
(),
dict
()
.
keys
(),
dict
()
.
items
()]
list
(),
dict
()
.
keys
(),
dict
()
.
items
()
,
dict
()
.
values
()
]
for
x
in
samples
:
for
x
in
samples
:
self
.
assertIsInstance
(
x
,
Collection
)
self
.
assertIsInstance
(
x
,
Collection
)
self
.
assertTrue
(
issubclass
(
type
(
x
),
Collection
),
repr
(
type
(
x
)))
self
.
assertTrue
(
issubclass
(
type
(
x
),
Collection
),
repr
(
type
(
x
)))
...
...
Misc/NEWS.d/next/Library/2018-01-11-00-33-42.bpo-32467.YVEOv6.rst
0 → 100644
Dosyayı görüntüle @
02556fba
collections.abc.ValuesView now inherits from collections.abc.Collection.
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