KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
In SQLAlchemy, it appears I'm supposed to pass an expression to filter() in certain cases. When I try to implement something like this myself, I end up with: >>> def someFunc(value): ... print(value) >>> someFunc(5 == 5) True How do I get the values passed to == from inside the function? I'm trying to achieve something like this >>> def magic(left, op, right): ... print(left + " " + op + " " + right) >>> magic(5 == 5) 5 == 5 What about if one of the parameters was an object?
Tags (comma-separated)
Save Edits
Cancel