Ejemplo 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()
Ejemplo 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()
Ejemplo n.º 3
0
 def ll_str(self, instance):
     return ootype.oostring(instance, -1)
Ejemplo n.º 4
0
Archivo: rstr.py Proyecto: sota/pypy
 def ll_chr2str(ch):
     return ootype.oostring(ch, -1)
Ejemplo n.º 5
0
Archivo: rclass.py Proyecto: sota/pypy
 def ll_str(self, instance):
     return ootype.oostring(instance, -1)
Ejemplo n.º 6
0
 def fn(i):
     s = ootype.oostring(42, -1)
     meth = s.ll_stritem_nonneg
     args = (i, )
     return meth(*args)
Ejemplo n.º 7
0
 def oof(ch):
     return ootype.oostring(ch, -1)
Ejemplo n.º 8
0
 def oof():
     return ootype.oostring(42, -1)
Ejemplo n.º 9
0
 def fn(i):
     s = ootype.oostring(42, -1)
     meth = s.ll_stritem_nonneg
     args = (i,)
     return meth(*args)
Ejemplo n.º 10
0
 def oofakeimpl(x, code, precision, flags):
     return ootype.oostring(rfloat.formatd(x, code, precision, flags), -1)
Ejemplo n.º 11
0
 def ll_chr2str(ch):
     return ootype.oostring(ch, -1)
Ejemplo n.º 12
0
def ll_int2dec(i):
    return oostring(i, 10)
Ejemplo n.º 13
0
def ll_float_str(repr, f):
    return oostring(f, -1)