VEX IQ Python API
|
Classes | |
class | AssertionError |
class | bytearray |
class | Exception |
class | object |
Functions | |
def | abs (n) |
Return the absolute value of a number. More... | |
def | float (n) |
Return a floating point number constructed from a number n. More... | |
def | round (n, ndigits=0) |
Return the floating point value number rounded to ndigits digits after the decimal point. More... | |
def | chr (n) |
Return a string of one character whose ASCII code is the integer i. More... | |
def | int (n) |
Convert a float, bool or string to an int. More... | |
def | str (n) |
Return a string containing a nicely printable representation of an object. More... | |
def | filter (f, s) |
Constructs a new list from those elements for which function returns true. More... | |
def | id (o) |
Return the “identity” integer of an object. More... | |
def | len (s) |
Return the length (the number of items) of an object. More... | |
def | map (f, s) |
Apply function to every item of iterable and return a list of the results. More... | |
def | ord (s) |
Given a string of length one, return an integer representing the character code. More... | |
def | pow (x, y) |
Return x to the power y; equivalent to using the power operator x ** y. More... | |
def | range (a, b, c) |
Creates lists containing arithmetic progressions, most often used in for loops. More... | |
def | type (o) |
Returns the type of an object (a number) More... | |
def | ismain () |
Returns True if called within a module being run as the main; False otherwise. More... | |
def __bi.abs | ( | n | ) |
Return the absolute value of a number.
def __bi.float | ( | n | ) |
Return a floating point number constructed from a number n.
Does NOT support parsing strings.
def __bi.round | ( | n, | |
ndigits = 0 |
|||
) |
Return the floating point value number rounded to ndigits digits after the decimal point.
If ndigits is omitted, it defaults to zero. The result is a floating point number. Values are rounded to the closest multiple of 10 to the power minus ndigits; if two multiples are equally close, rounding is done away from 0 (so. for example, round(0.5) is 1.0 and round(-0.5) is -1.0).
def __bi.chr | ( | n | ) |
Return a string of one character whose ASCII code is the integer i.
For example, chr(97) returns the string 'a'. This is the inverse of ord(). The argument must be in the range [0..255], inclusive; ValueError will be raised if i is outside that range.
def __bi.int | ( | n | ) |
Convert a float, bool or string to an int.
def __bi.str | ( | n | ) |
Return a string containing a nicely printable representation of an object.
For strings, this returns the string itself.
def __bi.filter | ( | f, | |
s | |||
) |
Constructs a new list from those elements for which function returns true.
f | function returning true to include) or false to exclude an item |
s | list of items to filter |
def __bi.id | ( | o | ) |
Return the “identity” integer of an object.
This is an integer which is guaranteed to be unique and constant for this object during its lifetime. Two objects with non-overlapping lifetimes may have the same id() value.
def __bi.len | ( | s | ) |
Return the length (the number of items) of an object.
The argument may be a sequence (such as a string, tuple, or list) or a collection (such as a dictionary).
def __bi.map | ( | f, | |
s | |||
) |
Apply function to every item of iterable and return a list of the results.
f | function to apply |
s | list of items |
def __bi.ord | ( | s | ) |
Given a string of length one, return an integer representing the character code.
For example, ord('a') returns the integer 97. This is the inverse of chr()
def __bi.pow | ( | x, | |
y | |||
) |
Return x to the power y; equivalent to using the power operator x ** y.
def __bi.range | ( | a, | |
b, | |||
c | |||
) |
Creates lists containing arithmetic progressions, most often used in for loops.
The arguments must be plain integers. If the step argument is omitted, it defaults to 1. If the start argument is omitted, it defaults to 0. The full form returns a list of plain integers [start, start + step, start + 2 * step, ...]. If step is positive, the last element is the largest start + i * step less than stop; if step is negative, the last element is the smallest start + i * step greater than stop. step must not be zero (or else ValueError is raised). Example:
def __bi.type | ( | o | ) |
Returns the type of an object (a number)
def __bi.ismain | ( | ) |
Returns True if called within a module being run as the main; False otherwise.