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
de394543
Kaydet (Commit)
de394543
authored
Mar 16, 2012
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
merge 3.2 (#14334)
üst
6e335250
16d84ac3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
0 deletions
+13
-0
test_descr.py
Lib/test/test_descr.py
+3
-0
NEWS
Misc/NEWS
+3
-0
typeobject.c
Objects/typeobject.c
+7
-0
No files found.
Lib/test/test_descr.py
Dosyayı görüntüle @
de394543
...
...
@@ -4400,6 +4400,9 @@ order (MRO) for bases """
self
.
assertRaises
(
AttributeError
,
getattr
,
EvilGetattribute
(),
"attr"
)
def
test_type___getattribute__
(
self
):
self
.
assertRaises
(
TypeError
,
type
.
__getattribute__
,
list
,
type
)
def
test_abstractmethods
(
self
):
# type pretends not to have __abstractmethods__.
self
.
assertRaises
(
AttributeError
,
getattr
,
type
,
"__abstractmethods__"
)
...
...
Misc/NEWS
Dosyayı görüntüle @
de394543
...
...
@@ -12,6 +12,9 @@ Core and Builtins
- Give the ast.AST class a __dict__.
- Issue #14334: Prevent in a segfault in type.__getattribute__ when it was not
passed strings.
- Issue #1469629: Allow cycles through an object'
s
__dict__
slot
to
be
collected
.
(
For
example
if
``
x
.
__dict__
is
x
``).
...
...
Objects/typeobject.c
Dosyayı görüntüle @
de394543
...
...
@@ -2486,6 +2486,13 @@ type_getattro(PyTypeObject *type, PyObject *name)
PyObject
*
meta_attribute
,
*
attribute
;
descrgetfunc
meta_get
;
if
(
!
PyUnicode_Check
(
name
))
{
PyErr_Format
(
PyExc_TypeError
,
"attribute name must be string, not '%.200s'"
,
name
->
ob_type
->
tp_name
);
return
NULL
;
}
/* Initialize this type (we'll assume the metatype is initialized) */
if
(
type
->
tp_dict
==
NULL
)
{
if
(
PyType_Ready
(
type
)
<
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