Skip to content

Commit 3403779

Browse files
committed
Improve win32com.client.build.MapEntry docstring
1 parent 16c4981 commit 3403779

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

com/win32com/client/build.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class NotSupportedException(Exception):
7070

7171

7272
class MapEntry:
73-
"Simple holder for named attibutes - items in a map."
73+
"""Simple holder for named attributes - items in a map."""
7474

7575
def __init__(
7676
self,
@@ -92,17 +92,16 @@ def __init__(
9292
self.doc = doc
9393
self.resultCLSID = resultCLSID
9494
self.resultDocumentation = resultDoc
95-
self.wasProperty = (
96-
0 # Have I been transformed into a function so I can pass args?
97-
)
95+
self.wasProperty = 0
96+
"""Has this MapEntry been transformed into a function so it can pass args?"""
9897
self.hidden = hidden
9998

10099
def __repr__(self):
101100
return (
102-
"MapEntry(dispid={s.dispid}, desc={s.desc}, names={s.names}, doc={s.doc!r}, "
103-
"resultCLSID={s.resultCLSID}, resultDocumentation={s.resultDocumentation}, "
104-
"wasProperty={s.wasProperty}, hidden={s.hidden}"
105-
).format(s=self)
101+
"MapEntry("
102+
+ ", ".join([f"{key}={value!r}" for key, value in self.__dict__.items()])
103+
+ ")"
104+
)
106105

107106
def GetResultCLSID(self):
108107
rc = self.resultCLSID

0 commit comments

Comments
 (0)