All Samples(42) | Call(0) | Derive(0) | Import(42)
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/p/y/PyAMF-HEAD/doc/tutorials/examples/actionscript/google_appengine/simplejson/scanner.py PyAMF(Download)
""" Iterator based sre token scanner """ import sre_parse, sre_compile, sre_constants from sre_constants import BRANCH, SUBPATTERN from re import VERBOSE, MULTILINE, DOTALL import re __all__ = ['Scanner', 'pattern'] FLAGS = (VERBOSE | MULTILINE | DOTALL)
src/f/u/funcparserlib-0.3.4/examples/json/json.py funcparserlib(Download)
''' import sys, os, re, logging from re import VERBOSE from pprint import pformat from funcparserlib.lexer import make_tokenizer, Token, LexerError from funcparserlib.parser import (some, a, maybe, many, finished, skip,
[\x20-\x21\x23-\x5b\x5d-\uffff] # Unescaped: avoid ["\\]
''',
}
re_esc = re.compile(regexps['escaped'], VERBOSE)
def tokenize(str):
'str -> Sequence(Token)'
specs = [
('Space', (r'[ \t\r\n]+',)),
('String', (ur'"(%(unescaped)s | %(escaped)s)*"' % regexps, VERBOSE)),
(0|([1-9][0-9]*)) # Int
(\.[0-9]+)? # Frac
([Ee][+-][0-9]+)? # Exp
''', VERBOSE)),
('Op', (r'[{}\[\]\-,:]',)),
('Name', (r'[A-Za-z_][A-Za-z_0-9]*',)),
]
src/i/n/inflect-0.2.1/inflect.py inflect(Download)
''' from re import match, search, subn, IGNORECASE, VERBOSE from re import split as splitre from re import error as reerror from re import sub as resub
# HANDLE ABBREVIATIONS
for a in (
(r"(%s)" % A_abbrev, "an", VERBOSE),
(r"^[aefhilmnorsx][.-]", "an", IGNORECASE),
(r"^[a-z][.-]", "a", IGNORECASE),
):
src/p/o/polinax-HEAD/libs/external_libs/simplejson-1.9.1/simplejson/scanner.py polinax(Download)
""" Iterator based sre token scanner """ import re from re import VERBOSE, MULTILINE, DOTALL import sre_parse import sre_compile import sre_constants from sre_constants import BRANCH, SUBPATTERN __all__ = ['Scanner', 'pattern'] FLAGS = (VERBOSE | MULTILINE | DOTALL)
src/g/e/geraldo-HEAD/site/newsite/site-geraldo/django/utils/simplejson/scanner.py geraldo(Download)
""" Iterator based sre token scanner """ import re from re import VERBOSE, MULTILINE, DOTALL import sre_parse import sre_compile import sre_constants from sre_constants import BRANCH, SUBPATTERN __all__ = ['Scanner', 'pattern'] FLAGS = (VERBOSE | MULTILINE | DOTALL)
src/g/e/geraldo-HEAD/site/newsite/django_1_0/django/utils/simplejson/scanner.py geraldo(Download)
""" Iterator based sre token scanner """ import re from re import VERBOSE, MULTILINE, DOTALL import sre_parse import sre_compile import sre_constants from sre_constants import BRANCH, SUBPATTERN __all__ = ['Scanner', 'pattern'] FLAGS = (VERBOSE | MULTILINE | DOTALL)
src/t/a/tablib-HEAD/tablib/packages/xlwt/ExcelFormulaLexer.py tablib(Download)
# -*- coding: windows-1252 -*- import sys from antlr import EOF, CommonToken as Tok, TokenStream, TokenStreamException import struct import ExcelFormulaParser from re import compile as recompile, match, LOCALE, UNICODE, IGNORECASE, VERBOSE
_re = recompile(
'(' + ')|('.join([i[0] for i in pattern_type_tuples]) + ')',
VERBOSE+LOCALE+IGNORECASE)
_toktype = [None] + [i[1] for i in pattern_type_tuples]
# need dummy at start because re.MatchObject.lastindex counts from 1
src/g/o/google-app-engine-HEAD/lib/django/django/utils/simplejson/scanner.py google-app-engine(Download)
""" Iterator based sre token scanner """ import sre_parse, sre_compile, sre_constants from sre_constants import BRANCH, SUBPATTERN from re import VERBOSE, MULTILINE, DOTALL import re __all__ = ['Scanner', 'pattern'] FLAGS = (VERBOSE | MULTILINE | DOTALL)
src/u/n/unladen-swallow-HEAD/Lib/json/scanner.py unladen-swallow(Download)
import sre_compile import sre_constants from re import VERBOSE, MULTILINE, DOTALL from sre_constants import BRANCH, SUBPATTERN __all__ = ['Scanner', 'pattern'] FLAGS = (VERBOSE | MULTILINE | DOTALL)
src/p/y/python2.6-cmake-HEAD/Lib/json/scanner.py python2.6-cmake(Download)
import sre_compile import sre_constants from re import VERBOSE, MULTILINE, DOTALL from sre_constants import BRANCH, SUBPATTERN __all__ = ['Scanner', 'pattern'] FLAGS = (VERBOSE | MULTILINE | DOTALL)
1 | 2 | 3 | 4 | 5 Next