Thinking about it, a third option would be to have both approaches in place:
elif isinstance(property, SuffixExpr):
# We know how to handle this specific case, so be smart property.expr = self.resolve(property.expr)
return property
elif isinstance(property, Expr):
# This is a generic expression that we don't handle (yet), so
# just take it as it is
return property
Thinking about it, a third option would be to have both approaches in place:
elif isinstance( property, SuffixExpr):
property. expr = self.resolve( property. expr) property, Expr):
# We know how to handle this specific case, so be smart
return property
elif isinstance(
# This is a generic expression that we don't handle (yet), so
# just take it as it is
return property