Skip to content

Commit c371b20

Browse files
committed
docs: fix doctest.
1 parent b78daea commit c371b20

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/lightning/pytorch/loggers/utilities.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -125,17 +125,17 @@ class _ListMap(list[_T]):
125125
TypeError: If a Mapping is provided and any of its keys are not of type str.
126126
127127
Example:
128-
>>> listmap = _ListMap({'obj1': obj1, 'obj2': obj2})
128+
>>> listmap = _ListMap({'obj1': 1, 'obj2': 2})
129129
>>> listmap['obj1'] # Access by name
130-
obj1
130+
1
131131
>>> listmap[0] # Access by index
132-
obj1
133-
>>> listmap['obj2'] = obj3 # Set by name
132+
1
133+
>>> listmap['obj2'] = 3 # Set by name
134134
>>> listmap[1] # Now returns obj3
135-
obj3
136-
>>> listmap.append(obj4) # Append by index
135+
3
136+
>>> listmap.append(4) # Append by index
137137
>>> listmap[2]
138-
obj4
138+
4
139139
140140
"""
141141

0 commit comments

Comments
 (0)