Skip to content

Commit 776c433

Browse files
author
Sreesh Maheshwar
committed
Add explanatory comment
1 parent 0fab7b1 commit 776c433

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pyiceberg/table/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1704,6 +1704,8 @@ def update(self: S, **overrides: Any) -> S:
17041704
"""Create a copy of this table scan with updated fields."""
17051705
from inspect import signature
17061706

1707+
# Extract those attributes that are constructor parameters. We don't use self.__dict__ as the kwargs to the
1708+
# constructors because it may contain additional attributes that are not part of the constructor signature.
17071709
params = signature(type(self).__init__).parameters.keys() - {"self"} # Skip "self" parameter
17081710
kwargs = {param: getattr(self, param) for param in params} # Assume parameters are attributes
17091711

0 commit comments

Comments
 (0)