both the left and right sides of an expression are ultimately represented as SQLAlchemy ColumnElements. When you say "somecol == 'somestr'", the 'somestr' part is coerced into a "literal" object as a result of it being pulled into the "binary" expression (that is, an expression with a left, right and an operator in the middle). You can do this explicitly so that you can call operators from either side:
literal("foobar").like(foo.bar)
both the left and right sides of an expression are ultimately represented as SQLAlchemy ColumnElements. When you say "somecol == 'somestr'", the 'somestr' part is coerced into a "literal" object as a result of it being pulled into the "binary" expression (that is, an expression with a left, right and an operator in the middle). You can do this explicitly so that you can call operators from either side:
literal("foobar").like(foo.bar)