Skip to content

Commit 119864d

Browse files
committed
clearer grammar in error message
1 parent 9c9ebe7 commit 119864d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

xarray/core/dataset.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1559,7 +1559,8 @@ def __setitem__(self, key: Union[Hashable, List[Hashable], Mapping], value) -> N
15591559
else:
15601560
if isinstance(value, Dataset):
15611561
raise TypeError(
1562-
"Cannot assign a Dataset to a single key, only a DataArray or Variable object"
1562+
"Cannot assign a Dataset to a single key - only a DataArray or Variable object can be stored under"
1563+
"a single key."
15631564
)
15641565
self.update({key: value})
15651566

0 commit comments

Comments
 (0)