From: charles F s. <yr...@ya...> - 2001-05-16 13:34:04
|
Hello Will, Here's a capture of a console session that shows (I think) what you want to do. just put the reverse quote character (my term, its to the left of the 1 key) before and after the variable holding the number. >>> cba = 123 >>> abc = 'abc' + cba Traceback (most recent call last): TypeError: __add__ nor __radd__ defined for these operands >>> abc = 'abc' + `cba` >>> print abc abc123 regards, charles simons --- Wil...@FI... wrote: > > this might be me just being really dim, but... > > why can't i do... > > cba=123 > abc='abc'+cba > > ...to make a string with value 'abc123' `? > what can i do instead ? > > i.e. if a have a variable that always has an integer > value, and i want to > append this integer to the end of a string... > > - will > > > ************************************************************************************************** > ** eSafe scanned this email for viruses, vandals and > malicious content ** > ************************************************************************************************** > > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > http://lists.sourceforge.net/lists/listinfo/jython-users __________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ |