Skip to content

Commit

Permalink
fix(python): Fix Series -> Expr dispatch for @Property methods (#5689)
Browse files Browse the repository at this point in the history
  • Loading branch information
stinodego committed Dec 1, 2022
1 parent 72b9d76 commit d22178a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion py-polars/polars/internals/series/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ def _expr_lookup(namespace: str | None) -> set[tuple[str | None, str, tuple[str,
lookup = set()
for name in dir(expr):
if not name.startswith("_"):
m = getattr(expr, name)
try:
m = getattr(expr, name)
except AttributeError: # May be raised for @property methods
continue
if callable(m):
# add function signature (argument names only) to the lookup
# as a _possible_ candidate for expression-dispatch
Expand Down

0 comments on commit d22178a

Please sign in to comment.