Did I find the right examples for you? yes no

All Samples(32)  |  Call(14)  |  Derive(3)  |  Import(15)

src/s/y/Sypy-HEAD/annotation/bookkeeper.py   Sypy(Download)
 
from pypy.objspace.flow.model import Constant
from pypy.annotation.model import SomeString, SomeChar, SomeFloat, \
     SomePtr, unionof, SomeInstance, SomeDict, SomeBuiltin, SomePBC, \
     SomeInteger, SomeOOInstance, SomeOOObject, TLS, SomeAddress, \
            no_nul = not '\x00' in x
            if len(x) == 1:
                result = SomeChar(no_nul=no_nul)
            else:
                result = SomeString(no_nul=no_nul)

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/annotation/unaryop.py   plexnet(Download)
 
from types import MethodType
from pypy.annotation.model import \
     SomeObject, SomeInteger, SomeBool, SomeString, SomeChar, SomeList, \
     SomeDict, SomeTuple, SomeImpossibleValue, \
class __extend__(SomeChar):
 
    def len(chr):
        return immutablevalue(1)
 

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/annotation/bookkeeper.py   plexnet(Download)
 
from pypy.objspace.flow.model import Constant
from pypy.annotation.model import SomeString, SomeChar, SomeFloat, \
     SomePtr, unionof, SomeInstance, SomeDict, SomeBuiltin, SomePBC, \
     SomeInteger, SomeOOInstance, SomeOOObject, TLS, SomeAddress, \
        elif issubclass(tp, str): # py.lib uses annotated str subclasses
            if len(x) == 1:
                result = SomeChar()
            else:
                result = SomeString()

src/s/y/Sypy-HEAD/annotation/unaryop.py   Sypy(Download)
 
from types import MethodType
from pypy.annotation.model import \
     SomeObject, SomeInteger, SomeBool, SomeString, SomeChar, SomeList, \
     SomeDict, SomeTuple, SomeImpossibleValue, SomeUnicodeCodePoint, \
class __extend__(SomeChar, SomeUnicodeCodePoint):
 
    def len(chr):
        return immutablevalue(1)
 
    def ord(str):
        return SomeInteger(nonneg=True)
 
class __extend__(SomeChar):

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/annotation/builtin.py   plexnet(Download)
 
import sys
from pypy.annotation.model import SomeInteger, SomeObject, SomeChar, SomeBool
from pypy.annotation.model import SomeString, SomeTuple, s_Bool, SomeBuiltin
from pypy.annotation.model import SomeUnicodeCodePoint, SomeAddress
def builtin_chr(s_int):
    return constpropagate(chr, [s_int], SomeChar())
 
def builtin_unichr(s_int):
    return constpropagate(unichr, [s_int], SomeUnicodeCodePoint())

src/s/y/Sypy-HEAD/annotation/builtin.py   Sypy(Download)
 
import sys
from pypy.annotation.model import SomeInteger, SomeObject, SomeChar, SomeBool
from pypy.annotation.model import SomeString, SomeTuple, s_Bool, SomeBuiltin
from pypy.annotation.model import SomeUnicodeCodePoint, SomeAddress
def builtin_chr(s_int):
    return constpropagate(chr, [s_int], SomeChar())
 
def builtin_unichr(s_int):
    return constpropagate(unichr, [s_int], SomeUnicodeCodePoint())

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rlib/rstring.py   plexnet(Download)
 
from pypy.rpython.extregistry import ExtRegistryEntry
from pypy.annotation.model import SomeObject, SomeString, s_None,\
     SomeChar, SomeInteger, SomeUnicodeCodePoint, SomeUnicodeString
 

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/objspace/std/formatting.py   plexnet(Download)
def is_list_of_chars_or_unichars(ann, bk):
    from pypy.annotation.model import SomeChar, SomeUnicodeCodePoint
    if not isinstance(ann.listdef.listitem.s_value,
                      (SomeChar, SomeUnicodeCodePoint)):
        raise TypeError("Formatter should return as a result a list of chars or unichars, otherwise we miss important optimization")

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rpython/rbuilder.py   plexnet(Download)
from pypy.rpython.lltypesystem import lltype
from pypy.rlib.rstring import INIT_SIZE
from pypy.annotation.model import SomeChar, SomeUnicodeCodePoint
 
class AbstractStringBuilderRepr(Repr):

src/s/y/Sypy-HEAD/rpython/rbuilder.py   Sypy(Download)
 
from pypy.rpython.rmodel import Repr
from pypy.rpython.lltypesystem import lltype
from pypy.rlib.rstring import INIT_SIZE
from pypy.annotation.model import SomeChar, SomeUnicodeCodePoint

  1 | 2  Next