Docs for META.regex_attr.groups

[ Python Tutorial ] [ Python Libraries ] [ web2py epydoc ]

Description


<type 'int'>















int(x=0) -> int or long
int(x, base=10) -> int or long

Convert a number or string to an integer, or return 0 if no arguments
are given. If x is floating point, the conversion truncates towards zero.
If x is outside the integer range, the function returns a long instead.

If x is not a number or if base is given, then x must be a string or
Unicode object representing an integer literal in the given base. The
literal can be preceded by '+' or '-' and be surrounded by whitespace.
The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to
interpret the base from the string as an integer literal.
>>>
int('0b100', base=0)
4


Attributes


META.regex_attr.groups.__abs__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__abs__() <==> abs(x)

META.regex_attr.groups.__add__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__add__(y) <==> x+y

META.regex_attr.groups.__and__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__and__(y) <==> x&y

META.regex_attr.groups.__class__ <type 'type'> extends (<type 'object'>,) belongs to class <type 'type'>
int(x=0) -> int or long int(x, base=10) -> int or long Convert a number or string to an integer, or return 0 if no arguments are given. If x is floating point, the conversion truncates towards zero. If x is outside the integer range, the function returns a long instead. If x is not a number or if base is given, then x must be a string or Unicode object representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int('0b100', base=0) 4

META.regex_attr.groups.__cmp__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__cmp__(y) <==> cmp(x,y)

META.regex_attr.groups.__coerce__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__coerce__(y) <==> coerce(x, y)

META.regex_attr.groups.__delattr__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__delattr__('name') <==> del x.name

META.regex_attr.groups.__div__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__div__(y) <==> x/y

META.regex_attr.groups.__divmod__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__divmod__(y) <==> divmod(x, y)

META.regex_attr.groups.__doc__ <type 'str'> belongs to class <type 'str'>
str(object='') -> string Return a nice string representation of the object. If the argument is a string, the return value is the same object.

META.regex_attr.groups.__float__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__float__() <==> float(x)

META.regex_attr.groups.__floordiv__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__floordiv__(y) <==> x//y

META.regex_attr.groups.__format__ <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>

META.regex_attr.groups.__getattribute__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__getattribute__('name') <==> x.name

META.regex_attr.groups.__getnewargs__ <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>

META.regex_attr.groups.__hash__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__hash__() <==> hash(x)

META.regex_attr.groups.__hex__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__hex__() <==> hex(x)

META.regex_attr.groups.__index__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x[y:z] <==> x[y.__index__():z.__index__()]

META.regex_attr.groups.__init__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__init__(...) initializes x; see help(type(x)) for signature

META.regex_attr.groups.__int__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__int__() <==> int(x)

META.regex_attr.groups.__invert__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__invert__() <==> ~x

META.regex_attr.groups.__long__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__long__() <==> long(x)

META.regex_attr.groups.__lshift__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__lshift__(y) <==> x<<y

META.regex_attr.groups.__mod__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__mod__(y) <==> x%y

META.regex_attr.groups.__mul__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__mul__(y) <==> x*y

META.regex_attr.groups.__neg__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__neg__() <==> -x

META.regex_attr.groups.__new__ <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
T.__new__(S, ...) -> a new object with type S, a subtype of T

META.regex_attr.groups.__nonzero__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__nonzero__() <==> x != 0

META.regex_attr.groups.__oct__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__oct__() <==> oct(x)

META.regex_attr.groups.__or__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__or__(y) <==> x|y

META.regex_attr.groups.__pos__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__pos__() <==> +x

META.regex_attr.groups.__pow__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__pow__(y[, z]) <==> pow(x, y[, z])

META.regex_attr.groups.__radd__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__radd__(y) <==> y+x

META.regex_attr.groups.__rand__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__rand__(y) <==> y&x

META.regex_attr.groups.__rdiv__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__rdiv__(y) <==> y/x

META.regex_attr.groups.__rdivmod__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__rdivmod__(y) <==> divmod(y, x)

META.regex_attr.groups.__reduce__ <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
helper for pickle

META.regex_attr.groups.__reduce_ex__ <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
helper for pickle

META.regex_attr.groups.__repr__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__repr__() <==> repr(x)

META.regex_attr.groups.__rfloordiv__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__rfloordiv__(y) <==> y//x

META.regex_attr.groups.__rlshift__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__rlshift__(y) <==> y<<x

META.regex_attr.groups.__rmod__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__rmod__(y) <==> y%x

META.regex_attr.groups.__rmul__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__rmul__(y) <==> y*x

META.regex_attr.groups.__ror__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__ror__(y) <==> y|x

META.regex_attr.groups.__rpow__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
y.__rpow__(x[, z]) <==> pow(x, y[, z])

META.regex_attr.groups.__rrshift__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__rrshift__(y) <==> y>>x

META.regex_attr.groups.__rshift__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__rshift__(y) <==> x>>y

META.regex_attr.groups.__rsub__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__rsub__(y) <==> y-x

META.regex_attr.groups.__rtruediv__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__rtruediv__(y) <==> y/x

META.regex_attr.groups.__rxor__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__rxor__(y) <==> y^x

META.regex_attr.groups.__setattr__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__setattr__('name', value) <==> x.name = value

META.regex_attr.groups.__sizeof__ <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
__sizeof__() -> int size of object in memory, in bytes

META.regex_attr.groups.__str__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__str__() <==> str(x)

META.regex_attr.groups.__sub__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__sub__(y) <==> x-y

META.regex_attr.groups.__subclasshook__ <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
Abstract classes can override this to customize issubclass(). This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

META.regex_attr.groups.__truediv__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__truediv__(y) <==> x/y

META.regex_attr.groups.__trunc__ <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
Truncating an Integral returns itself.

META.regex_attr.groups.__xor__ <type 'method-wrapper'> belongs to class <type 'method-wrapper'>
x.__xor__(y) <==> x^y

META.regex_attr.groups.bit_length <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
int.bit_length() -> int Number of bits necessary to represent self in binary. >>> bin(37) '0b100101' >>> (37).bit_length() 6

META.regex_attr.groups.conjugate <type 'builtin_function_or_method'> belongs to class <type 'builtin_function_or_method'>
Returns self, the complex conjugate of any int.

META.regex_attr.groups.denominator <type 'int'> belongs to class <type 'int'>
int(x=0) -> int or long int(x, base=10) -> int or long Convert a number or string to an integer, or return 0 if no arguments are given. If x is floating point, the conversion truncates towards zero. If x is outside the integer range, the function returns a long instead. If x is not a number or if base is given, then x must be a string or Unicode object representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int('0b100', base=0) 4

META.regex_attr.groups.imag <type 'int'> belongs to class <type 'int'>
int(x=0) -> int or long int(x, base=10) -> int or long Convert a number or string to an integer, or return 0 if no arguments are given. If x is floating point, the conversion truncates towards zero. If x is outside the integer range, the function returns a long instead. If x is not a number or if base is given, then x must be a string or Unicode object representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int('0b100', base=0) 4

META.regex_attr.groups.numerator <type 'int'> belongs to class <type 'int'>
int(x=0) -> int or long int(x, base=10) -> int or long Convert a number or string to an integer, or return 0 if no arguments are given. If x is floating point, the conversion truncates towards zero. If x is outside the integer range, the function returns a long instead. If x is not a number or if base is given, then x must be a string or Unicode object representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int('0b100', base=0) 4

META.regex_attr.groups.real <type 'int'> belongs to class <type 'int'>
int(x=0) -> int or long int(x, base=10) -> int or long Convert a number or string to an integer, or return 0 if no arguments are given. If x is floating point, the conversion truncates towards zero. If x is outside the integer range, the function returns a long instead. If x is not a number or if base is given, then x must be a string or Unicode object representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int('0b100', base=0) 4