You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if reply.sth:
return reply.sth.to_dict()
return {}
It would be nice if sget() supported returning of default argument on which you could still invoke to_dict():
return reply.sget('sth', {}).to_dict()
But this might be tricky to implement, since default argument gets returned as is. In this case, Pythons dict do not support to_dict().
Alternative would be to specify helper methods directly in the sget() string:
return reply.sget('sth.to_dict()', {})
The text was updated successfully, but these errors were encountered:
The common pattern I see is:
It would be nice if sget() supported returning of default argument on which you could still invoke to_dict():
But this might be tricky to implement, since default argument gets returned as is. In this case, Pythons dict do not support to_dict().
Alternative would be to specify helper methods directly in the sget() string:
The text was updated successfully, but these errors were encountered: