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
1e68827c
Kaydet (Commit)
1e68827c
authored
Tem 01, 2000
tarafından
Paul Prescod
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Misc fixes and improvements.
üst
bd8c2ae7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
minidom.py
Lib/xml/dom/minidom.py
+16
-4
No files found.
Lib/xml/dom/minidom.py
Dosyayı görüntüle @
1e68827c
...
...
@@ -40,7 +40,8 @@ class Node:
index
=
repr
(
id
(
self
))
+
repr
(
self
.
__class__
)
Node
.
allnodes
[
index
]
=
repr
(
self
.
__dict__
)
if
Node
.
debug
==
None
:
Node
.
debug
=
open
(
"debug4.out"
,
"w"
)
Node
.
debug
=
StringIO
()
#open( "debug4.out", "w" )
Node
.
debug
.
write
(
"create
%
s
\n
"
%
index
)
def
__getattr__
(
self
,
key
):
...
...
@@ -216,13 +217,24 @@ dictionary"""
#FIXME: is it appropriate to return .value?
def
__getitem__
(
self
,
attname_or_tuple
):
if
type
(
attname_or_tuple
)
==
type
(
()
)
:
if
type
(
attname_or_tuple
)
==
type
s
.
TupleType
:
return
self
.
_attrsNS
[
attname_or_tuple
]
else
:
return
self
.
_attrs
[
attname_or_tuple
]
def
__setitem__
(
self
,
attname
):
raise
TypeError
,
"object does not support item assignment"
# same as set
def
__setitem__
(
self
,
attname
,
value
):
if
type
(
value
)
==
types
.
StringType
:
node
=
Attr
(
attname
)
node
.
value
=
value
else
:
assert
isinstance
(
value
,
Attr
)
or
type
(
value
)
==
types
.
StringType
node
=
value
old
=
self
.
_attrs
.
get
(
attname
,
None
)
if
old
:
old
.
unlink
()
self
.
_attrs
[
node
.
name
]
=
node
self
.
_attrsNS
[(
node
.
namespaceURI
,
node
.
localName
)]
=
node
def
__delitem__
(
self
,
attname_or_tuple
):
node
=
self
[
attname_or_tuple
]
...
...
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