• Facebook
  • Twitter
  • Reddit
  • StumbleUpon
  • Digg
  • email

All Samples(544)  |  Call(9)  |  Derive(3)  |  Import(532)
int(x[, base]) -> integer

Convert a string or number to an integer, if possible.  A floating point
argument will be truncated towards zero (this does not include a string
representation of a floating point number!)  When converting a string, use
the optional base.  It is an error to supply a base when converting a
non-string.  If base is zero, the proper base is guessed based on the
string content.  If the argument is outside the integer range a
long object will be returned instead.

src/a/l/alexandria-HEAD/src/alexandria/sessions/db/models.py   alexandria(Download)
        ('Boolean', lambda v: v == 'True'), 
        ('Dict', lambda v: simplejson.loads(v)), 
        ('Float', lambda v: types.FloatType(v)), 
        ('Int', lambda v: types.IntType(v)), 
        ('List', lambda v: simplejson.loads(v)), 
        ('Long', lambda v: types.LongType(v)), 
        ('None', lambda v: None), 

src/p/y/PyXB-base-1.1.0/pyxb/binding/datatypes.py   PyXB(Download)
class boolean (basis.simpleTypeDefinition, types.IntType):
    """boolean.
 
    U{http://www.w3.org/TR/xmlschema-2/#boolean}"""
    _XsdBaseType = anySimpleType
    _ExpandedName = pyxb.namespace.XMLSchema.createExpandedName('boolean')
 
            fractional_seconds = 0.0
            if match_map.get('fracsec', None) is not None:
                fractional_seconds = types.FloatType('0%s' % (match_map['fracsec'],))
                usec = types.IntType(1000000 * fractional_seconds)
                if negative_duration:
                    kw['microseconds'] = - usec
                else:
                v = match_map.get(fn, 0)
                if v is None:
                    v = 0
                data[fn] = types.IntType(v)
                if fn in cls.__PythonFields:
                    if negative_duration:
                        kw[fn] = - data[fn]
            rem_time = data['seconds']
            use_seconds = rem_time
            if (0 != (rem_time % 1)):
                data['microseconds'] = types.IntType(1000000 * (rem_time % 1))
                rem_time = rem_time // 1
            if 60 <= rem_time:
                data['seconds'] = rem_time % 60
        kw = { }
        for (k, v) in match_map.iteritems():
            if (k in cls.__Fields) and (v is not None):
                kw[k] = types.IntType(v)
        if '-' == match_map.get('negYear', None):
            kw['year'] = - kw['year']
        if match_map.get('fracsec', None) is not None:
            kw['microsecond'] = types.IntType(1000000 * types.FloatType('0%s' % (match_map['fracsec'],)))
class int (basis.simpleTypeDefinition, types.IntType):
    _XsdBaseType = long
    _ExpandedName = pyxb.namespace.XMLSchema.createExpandedName('int')
 
    @classmethod
    def XsdLiteral (cls, value):
        return '%s' % (value,)

src/s/p/springnote.py-with-oauth-HEAD/springnote.py   springnote.py-with-oauth(Download)
    check_parameters = {
        'sort'     : lambda x: x in ['identifier', 'title', 'relation_is_par_of', 'date_modified', 'date_created'],
        'order'    : lambda x: x in ['desc', 'asc'],
        'offset'   : lambda x: types.IntType(x),
        'count'    : lambda x: types.IntType(x),
        'parent_id': lambda x: types.IntType(x),
        'q'        : lambda x: types.UnicodeType(x),

src/z/o/zope.app.twisted-3.5.0/src/twisted/spread/jelly.py   zope.app.twisted(Download)
    from types import UnicodeType
except ImportError:
    UnicodeType = None
from types import IntType
from types import TupleType
from types import ListType
from types import LongType

src/i/r/ironruby-HEAD/External.LCA_RESTRICTED/Languages/IronPython/27/Doc/docutils/nodes.py   ironruby(Download)
import os
import re
import warnings
from types import IntType, SliceType, StringType, UnicodeType, \
     TupleType, ListType, ClassType, TypeType
from UserString import UserString
 

src/b/a/banyanims-HEAD/trunk/dependencies/zope-instance-2.7.4-0/Products/Archetypes/Field.py   banyanims(Download)
from copy import deepcopy
from cgi import escape
from cStringIO import StringIO
from types import ListType, TupleType, ClassType, FileType, DictType, IntType
from types import StringType, UnicodeType, StringTypes
 
from AccessControl import ClassSecurityInfo

src/z/e/zenoss-HEAD/trunk/Products/PluggableAuthService/UserPropertySheet.py   zenoss(Download)
 
$Id: UserPropertySheet.py 70450 2006-09-30 19:01:58Z rafrombrc $
"""
from types import IntType
from types import FloatType
from types import LongType
from types import TupleType

src/b/a/bases-HEAD/trunk/bases/thirdparty/jecode.py   bases(Download)
    return r
 
 
from types import NoneType, IntType, LongType, FloatType, DictType, ListType
from types import TupleType, StringType, UnicodeType, BooleanType
 
# Encode integers

src/b/a/banyanims-HEAD/dependencies/zope-instance-2.7.4-0/Products/Archetypes/Field.py   banyanims(Download)
from copy import deepcopy
from cgi import escape
from cStringIO import StringIO
from types import ListType, TupleType, ClassType, FileType, DictType, IntType
from types import StringType, UnicodeType, StringTypes
 
from AccessControl import ClassSecurityInfo

src/z/e/zenoss-HEAD/Products/PluggableAuthService/UserPropertySheet.py   zenoss(Download)
 
$Id: UserPropertySheet.py 70450 2006-09-30 19:01:58Z rafrombrc $
"""
from types import IntType
from types import FloatType
from types import LongType
from types import TupleType

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