Re: How to recast integer to a string

2006-05-09 Thread Christoph Haas
On Tue, May 09, 2006 at 12:34:05PM -0700, James wrote: > > Christoph Haas wrote: > > On Tue, May 09, 2006 at 12:17:34PM -0700, James wrote: > > > How to recast an integer to a string? > > > > > > something like > > > n = 5 > > > str = str + char(n) > > > > str(n) > > > > Kindly > > Christoph > >

Re: How to recast integer to a string

2006-05-09 Thread Fredrik Lundh
James wrote: > > > How to recast an integer to a string? > > > > > > something like > > > n = 5 > > > str = str + char(n) > > > > str(n) > > > > Kindly > > Christoph > > In python2,4, I 've got > TypeError: 'str' object is not callable if you want to use a builtin function, you cannot use the sa

Re: How to recast integer to a string

2006-05-09 Thread Larry Bates
James wrote: > How to recast an integer to a string? > > something like > n = 5 > str = str + char(n) > > > J.L > Two items: 1) Never use 'str' as a variable name as it will shadow the built in str function. If you do, this WILL jump up and bite you. 2) Either s=str(n) or s="%i" % n will ret

Re: How to recast integer to a string

2006-05-09 Thread Grant Edwards
On 2006-05-09, James <[EMAIL PROTECTED]> wrote: > How to recast an integer to a string? > something like > n = 5 > str = str + char(n) str = str + chr(5) -- Grant Edwards grante Yow! I want EARS! I at want two ROUND

Re: How to recast integer to a string

2006-05-09 Thread James
Christoph Haas wrote: > On Tue, May 09, 2006 at 12:17:34PM -0700, James wrote: > > How to recast an integer to a string? > > > > something like > > n = 5 > > str = str + char(n) > > str(n) > > Kindly > Christoph In python2,4, I 've got TypeError: 'str' object is not callable J.L -- http://ma

Re: How to recast integer to a string

2006-05-09 Thread Christoph Haas
On Tue, May 09, 2006 at 12:17:34PM -0700, James wrote: > How to recast an integer to a string? > > something like > n = 5 > str = str + char(n) str(n) Kindly Christoph -- http://mail.python.org/mailman/listinfo/python-list