Did I find the right examples for you? yes no

All Samples(76)  |  Call(56)  |  Derive(6)  |  Import(14)

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__(SomeObject):
 
    def type(obj, *moreargs):
        if moreargs:
            raise Exception, 'type() called with more than one argument'
                r = immutablevalue(obj.knowntype)
        else:
            r = SomeObject()
            r.knowntype = type
        bk = getbookkeeper()
    def long(obj):
        return SomeObject()   # XXX
 
    def delattr(obj, s_attr):
        if obj.__class__ != SomeObject or obj.knowntype != object:
            getbookkeeper().warning('getattr(%r, %r) is not RPythonic enough' %
                                    (obj, s_attr))
        return SomeObject()
    getattr.can_only_throw = []
 

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, \
            assert not hasattr(x, 'im_self')
        if x is sys: # special case constant sys to someobject
            return SomeObject()
        tp = type(x)
        if issubclass(tp, Symbolic): # symbolic constants support
                result = s_self.find_method(x.__name__)
                if result is None:
                    result = SomeObject()
            else:
                result = None
                    # XXX note that the print support functions are __builtin__
                    and tp not in (types.FunctionType, types.MethodType)):
                    result = SomeObject()
                    result.knowntype = tp # at least for types this needs to be correct
                else:
            return s_None
        else:
            result = SomeObject()
        if need_const:
            result.const = x

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__(SomeObject):
 
    def type(obj, *moreargs):
        if moreargs:
            raise Exception, 'type() called with more than one argument'
                r = immutablevalue(obj.knowntype)
        else:
            r = SomeObject()
            r.knowntype = type
        bk = getbookkeeper()
    def long(obj):
        return SomeObject()   # XXX
 
    def delattr(obj, s_attr):
        if obj.__class__ != SomeObject or obj.knowntype != object:
            getbookkeeper().warning('getattr(%r, %r) is not RPythonic enough' %
                                    (obj, s_attr))
        return SomeObject()
    getattr.can_only_throw = []
 

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, \
            assert not hasattr(x, 'im_self')
        if x is sys: # special case constant sys to someobject
            return SomeObject()
        tp = type(x)
        if issubclass(tp, Symbolic): # symbolic constants support
                result = s_self.find_method(x.__name__)
                if result is None:
                    result = SomeObject()
            else:
                result = None
                    # XXX note that the print support functions are __builtin__
                    and tp not in (types.FunctionType, types.MethodType)):
                    result = SomeObject()
                    result.knowntype = tp # at least for types this needs to be correct
                else:
            return s_None
        else:
            result = SomeObject()
        if need_const:
            result.const = x

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_tuple(s_iterable):
    if isinstance(s_iterable, SomeTuple):
        return s_iterable
    return SomeObject()
 
def builtin_apply(*stuff):
    getbookkeeper().warning("ignoring apply%r" % (stuff,))
    return SomeObject()
 
##def builtin_slice(*args):
def import_func(*args):
    return SomeObject()
 
# collect all functions
import __builtin__

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_tuple(s_iterable):
    if isinstance(s_iterable, SomeTuple):
        return s_iterable
    return SomeObject()
 
def builtin_apply(*stuff):
    getbookkeeper().warning("ignoring apply%r" % (stuff,))
    return SomeObject()
 
##def builtin_slice(*args):
def import_func(*args):
    return SomeObject()
 
# collect all functions
import __builtin__

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/annotation/signature.py   plexnet(Download)
 
import types
from pypy.annotation.model import SomeBool, SomeInteger, SomeString,\
     SomeFloat, SomeList, SomeDict, s_None, \
     SomeObject, SomeInstance, SomeTuple, lltype_to_annotation,\
        return SomeInstance(classdef)
    else:
        o = SomeObject()
        if t != object:
            o.knowntype = t

src/s/y/Sypy-HEAD/annotation/signature.py   Sypy(Download)
 
import types
from pypy.annotation.model import SomeBool, SomeInteger, SomeString,\
     SomeFloat, SomeList, SomeDict, s_None, \
     SomeObject, SomeInstance, SomeTuple, lltype_to_annotation,\
        return SomeInstance(classdef)
    else:
        o = SomeObject()
        if t != object:
            o.knowntype = t

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/annotation/listdef.py   plexnet(Download)
from pypy.annotation.model import SomeObject, s_ImpossibleValue
from pypy.annotation.model import SomeList, SomeString
from pypy.annotation.model import unionof, TLS, UnionError, isdegenerated
 
 
        self.listitem.dont_change_any_more = True
 
MOST_GENERAL_LISTDEF = ListDef(None, SomeObject())
 
s_list_of_strings = SomeList(ListDef(None, SomeString(), resized = True))

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
 
class SomeStringBuilder(SomeObject):
    def method_append(self, s_str):
        assert isinstance(s_str, (SomeString, SomeChar))
        return s_None
 
class SomeUnicodeBuilder(SomeObject):
    def method_append(self, s_str):
        assert isinstance(s_str, (SomeUnicodeCodePoint, SomeUnicodeString))
        return s_None
 

  1 | 2 | 3  Next