[Zope] [python] converting int to string?

Jonothan Farr jfarr@real.com
Mon, 8 Jan 2001 12:29:07 -0800


> > >in python you can do:
> >
> > >str(int)
> >
> > >and in zope you do it like
> >
> > >_.str(int)
> >
> > You can also use the short form in both Zope and Python:
> >
> > `int`
> >
> > Two of those funny `` characters surrounding what you want converted to a
> > string.
>
> The backtick notation `` is actually the shorthand for repr(), not str(). In
the
> case of ints this will give you the same result but not in all cases. I second
> Jens's recommendation. _Learning Python_ is a great book.


Oops. Please pardon the ambiguity. I meant, "in the case of ints... but not in
the case of some other types of objects."

--jfarr