First time here? Check out the FAQ!
answered 1 year ago
This is because of the Sage preparser — search for "raw literals" on that page. In particular "2r" is interpreted as a "raw" integer as opposed to a Sage integer.
"2r"
sage: type(2r) # a Python int, not a Sage Integer <class 'int'>