Python API Functions equivalent to ruby's rb_big2str() and rb_str2cstr()
sjmachin at lexicon.net
Tue May 12 18:03:33 CEST 2009
On May 12, 11:48 pm, Hrvoje Niksic <hnik... at xemacs.org> wrote:
> rahul <rahul03... at gmail.com> writes:
> > Hi Christian,
> > rb_big2str(Big-Integer, base) of ruby returns string
> > of big-Integer. now, i am able to find equivalent python API function
> > of rb_str2cstr() of ruby.
> That would be PyLong_FromString, for the sake of later searches.
> > so , please help me about rb_big2str(Big-Integer, base)
> equivalent of
> > Python API function which i can use in extended module in c.
> You can use PyObject_Str(long_object) to convert long to string. No
> special function is needed.
ALL of your base are want to be convert by us -- not merely 10.
More information about the Python-list