Skip to content

Commit

Permalink
fix for debuggers not showing content of objects when running python …
Browse files Browse the repository at this point in the history
…3.8+
  • Loading branch information
Tareq Ibrahim committed Feb 25, 2021
1 parent 1dabd3d commit 711b54c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docx/oxml/xmlchemy.py
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,10 @@ def xpath(self, xpath_str):
@property
def _nsptag(self):
return NamespacePrefixedTag.from_clark_name(self.tag)


def __dict__(self):
# __dict__ is required for debuggers to show the content of objects when running Python 3.8+
return None

BaseOxmlElement = MetaOxmlElement(
'BaseOxmlElement', (etree.ElementBase,), dict(_OxmlElementBase.__dict__)
Expand Down

0 comments on commit 711b54c

Please sign in to comment.