Did I find the right examples for you? yes no

All Samples(92)  |  Call(92)  |  Derive(0)  |  Import(0)
T.__new__(S, ...) -> a new object with type S, a subtype of T

src/d/j/django-admin-report-HEAD/example/lib/reportlab/graphics/charts/piecharts.py   django-admin-report(Download)
    def __new__(cls,angle,data):
        self = float.__new__(cls,angle)
        self._data = data
        return self
 

src/c/h/chemshapes-HEAD/host/pygletHG/contrib/layout/layout/base.py   chemshapes(Download)
    def __neg__(self):
        n = float.__new__(self.__class__, -float(self))
        return n
 
class Percentage(float):
    '''A percentage, expressed as float in range [0,1].'''
    def __new__(cls, text):
        return float.__new__(cls, float(text[:-1]) / 100.)
    def __neg__(self):
        n = float.__new__(self.__class__, -float(self))
        return n
 
class Dimension(float):
    def __new__(cls, text):
        unit = text.lstrip('0123456789.')
        num = text[:-len(unit)]
        n = float.__new__(cls, num)
        n.unit = unit.lower()
        return n
 
    def __neg__(self):
        n = float.__new__(self.__class__, -float(self))

src/p/y/pyglet-HEAD/contrib/layout/layout/base.py   pyglet(Download)
    def __neg__(self):
        n = float.__new__(self.__class__, -float(self))
        return n
 
class Percentage(float):
    '''A percentage, expressed as float in range [0,1].'''
    def __new__(cls, text):
        return float.__new__(cls, float(text[:-1]) / 100.)
    def __neg__(self):
        n = float.__new__(self.__class__, -float(self))
        return n
 
class Dimension(float):
    def __new__(cls, text):
        unit = text.lstrip('0123456789.')
        num = text[:-len(unit)]
        n = float.__new__(cls, num)
        n.unit = unit.lower()
        return n
 
    def __neg__(self):
        n = float.__new__(self.__class__, -float(self))

src/d/j/django-extras-0.2.9/django_extras/core/types.py   django-extras(Download)
    def __new__(cls, value=None):
        if value is None:
            return float.__new__(cls, 0.0)
        if isinstance(value, float):
            if 90.0 >= value >= -90.0:
                return float.__new__(cls, value)
    def __new__(cls, value=None):
        if value is None:
            return float.__new__(cls, 0.0)
        if isinstance(value, float):
            if 180.0 >= value >= -180.0:
                return float.__new__(cls, value)

src/s/p/sprintkit-0.1.0/src/sprintkit/gps.py   sprintkit(Download)
    def __new__(cls, value=None):
        if value is None:
            return float.__new__(cls, 0.0)
        if isinstance(value, float):
            if value <= 60.0 and value >= 0.0:
                return float.__new__(cls, value)
    def __new__(cls, value=None):
        if value is None:
            return float.__new__(cls, 0.0)
        if isinstance(value, float):
            if value <= 90.0 and value >= -90.0:
                return float.__new__(cls, value)
    def __new__(cls, value=None):
        if value is None:
            return float.__new__(cls, 0.0)
        if isinstance(value, float):
            if value <= 180.0 and value >= -180.0:

src/d/j/django-extras-HEAD/django_extras/core/types.py   django-extras(Download)
    def __new__(cls, value=None):
        if value is None:
            return float.__new__(cls, 0.0)
        if isinstance(value, float):
            if 90.0 >= value >= -90.0:
                return float.__new__(cls, value)
    def __new__(cls, value=None):
        if value is None:
            return float.__new__(cls, 0.0)
        if isinstance(value, float):
            if 180.0 >= value >= -180.0:
                return float.__new__(cls, value)

src/c/o/cogent-1.5.3/cogent/align/dp_calculation.py   cogent(Download)
    def __new__(cls, value, **kw):
        return float.__new__(cls, value)
    def __init__(self, value, **kw):
        float.__init__(self)
        for (n,v) in kw.items():

src/p/y/pycogent-HEAD/cogent/align/dp_calculation.py   pycogent(Download)
    def __new__(cls, value, **kw):
        return float.__new__(cls, value)
    def __init__(self, value, **kw):
        float.__init__(self)
        for (n,v) in kw.items():

src/c/h/chisel-0.6.16/chisel/model.py   chisel(Download)
    def __new__(cls, value):
        return float.__new__(cls, 0)
 
    def __init__(self, value):
        if value.tzinfo is None:
    def __new__(cls, value, prec):
        return float.__new__(cls, value)
 
    def __init__(self, value, prec):
        self.json = format(value, '.' + str(prec) + 'f').rstrip('0').rstrip('.')
    def __new__(cls, value):
        return float.__new__(cls, 0)
 
    def __init__(self, value):
        self.value = value

src/c/h/chemshapes-HEAD/host/prefs/__init__.py   chemshapes(Download)
                v /= types[ str(self).split("'")[1] ]
                v = abs(v) * sign
            return float.__new__(self, v)
        else:
            v = 0.0
 
        return float.__new__(self, v)

  1 | 2 | 3 | 4 | 5 | 6 | 7  Next