Ruby way:
"1".to_i
"1".to_roman
Python way:
int("1")
Roman("1") # or
Roman.fromstring("1")
Where Roman will work on a fixed list of built-in types or anything with a __int__ method.
It is an implementation limitation of CPython that you can't set attributes of built-in/extension types. It is accompanied by cultural preference to avoid monkey-patching in favor of stand-alone functions, custom classes that have as an attribute desired object (or even subclassing in rare cases).