Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
1e68827c
Commit
1e68827c
authored
Jul 01, 2000
by
Paul Prescod
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Misc fixes and improvements.
parent
bd8c2ae7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
Lib/xml/dom/minidom.py
Lib/xml/dom/minidom.py
+16
-4
No files found.
Lib/xml/dom/minidom.py
View file @
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