Esempio n. 1
0
def ll_int2oct(i, addPrefix):
    if not addPrefix or i==0:
        return oostring(i, 8)

    buf = new(StringBuilder)
    if i<0:
        if i == SPECIAL_VALUE:
            return SPECIAL_VALUE_OCT
        i = -i
        buf.ll_append_char('-')

    buf.ll_append_char('0')
    buf.ll_append(oostring(i, 8))
    return buf.ll_build()
Esempio n. 2
0
def ll_int2hex(i, addPrefix):
    if not addPrefix:
        return oostring(i, 16)

    buf = new(StringBuilder)
    if i<0:
        if i == SPECIAL_VALUE:
            return SPECIAL_VALUE_HEX
        i = -i
        buf.ll_append_char('-')

    buf.ll_append_char('0')
    buf.ll_append_char('x')
    buf.ll_append(oostring(i, 16))
    return buf.ll_build()
Esempio n. 3
0
 def ll_str(self, instance):
     return ootype.oostring(instance, -1)
Esempio n. 4
0
File: rstr.py Progetto: sota/pypy
 def ll_chr2str(ch):
     return ootype.oostring(ch, -1)
Esempio n. 5
0
File: rclass.py Progetto: sota/pypy
 def ll_str(self, instance):
     return ootype.oostring(instance, -1)
Esempio n. 6
0
 def fn(i):
     s = ootype.oostring(42, -1)
     meth = s.ll_stritem_nonneg
     args = (i, )
     return meth(*args)
Esempio n. 7
0
 def oof(ch):
     return ootype.oostring(ch, -1)
Esempio n. 8
0
 def oof():
     return ootype.oostring(42, -1)
Esempio n. 9
0
 def fn(i):
     s = ootype.oostring(42, -1)
     meth = s.ll_stritem_nonneg
     args = (i,)
     return meth(*args)
Esempio n. 10
0
 def oofakeimpl(x, code, precision, flags):
     return ootype.oostring(rfloat.formatd(x, code, precision, flags), -1)
Esempio n. 11
0
 def ll_chr2str(ch):
     return ootype.oostring(ch, -1)
Esempio n. 12
0
def ll_int2dec(i):
    return oostring(i, 10)
Esempio n. 13
0
def ll_float_str(repr, f):
    return oostring(f, -1)