Despite saying it's not what you want, what you've described is a driver. It might sometimes be called a 'Scripted Expression' (and the Blender Manual now refers to it simply as an 'Expression'), but it's still just a type of driver.
Type #frame * 10 into a property field, e.g. the 'X' location of an object, and press Enter and the property will turn purple, indicating the expression has automatically been turned into a driver. This driver can then be tweaked either by clicking on the property again or by looking in the 'Drivers Editor'.
The types of commands that can be typed into property fields are called 'Simple Expressions'.
An example of the keywords you can type into a property from the Blender Manual:
Globals
frame
Constants
pi, True, False
Operators
+, -, *, /, ==, !=, <, <=, >, >=, and, or, not, conditional operator/ ternary if
Functions
min, max, radians, degrees, abs, fabs, floor, ceil, trunc, int, sin, cos, tan, asin, acos, atan, atan2, exp, log, sqrt, pow, fmod
Note: You need to have a # symbol in front of the expression, e.g. #frame * 2. In the case of 'Constants', 'Operators' and 'Functions' (but not frame), if you omit the # Blender will simply change the property to be the result of the expression, but it won't be driven by it.
selfis not in list. On your note, can typecos(pi)directly into a field and it will be the result. However cannot do same withframeas it doesn't appear to be in the "UI namespace" only the driver namespace. – batFINGER Jul 01 '20 at 16:58