> str is very much immutable. > So you can't even set some custom attribute.
I found a way to cheat. =) Python 2.6 has backported the Python 3000 bytearray() method, which is basically just a mutable str. No import statement needed. http://www.python.org/dev/peps/pep-3112/ So you can copy your str into a bytearray, change it, then make it a str again. I can't believe I never ran into this before(!) If it's in Python 3.X, it must be good. ;-) -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org