예제 #1
0
파일: ll_str.py 프로젝트: sota/pypy-old
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()
예제 #2
0
파일: ll_str.py 프로젝트: sota/pypy-old
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()
예제 #3
0
 def ll_str(self, instance):
     return ootype.oostring(instance, -1)
예제 #4
0
파일: rstr.py 프로젝트: sota/pypy
 def ll_chr2str(ch):
     return ootype.oostring(ch, -1)
예제 #5
0
파일: rclass.py 프로젝트: sota/pypy
 def ll_str(self, instance):
     return ootype.oostring(instance, -1)
예제 #6
0
 def fn(i):
     s = ootype.oostring(42, -1)
     meth = s.ll_stritem_nonneg
     args = (i, )
     return meth(*args)
예제 #7
0
 def oof(ch):
     return ootype.oostring(ch, -1)
예제 #8
0
 def oof():
     return ootype.oostring(42, -1)
예제 #9
0
파일: test_oortype.py 프로젝트: sota/pypy
 def fn(i):
     s = ootype.oostring(42, -1)
     meth = s.ll_stritem_nonneg
     args = (i,)
     return meth(*args)
예제 #10
0
파일: ll_strtod.py 프로젝트: sota/pypy-old
 def oofakeimpl(x, code, precision, flags):
     return ootype.oostring(rfloat.formatd(x, code, precision, flags), -1)
예제 #11
0
 def ll_chr2str(ch):
     return ootype.oostring(ch, -1)
예제 #12
0
파일: ll_str.py 프로젝트: sota/pypy-old
def ll_int2dec(i):
    return oostring(i, 10)
예제 #13
0
파일: ll_str.py 프로젝트: sota/pypy-old
def ll_float_str(repr, f):
    return oostring(f, -1)