Namespace: builtin

Sk.builtin

Source:

Classes

bool
float_
func
int_
none
NotImplemented
numtype
object
seqtype

Methods

(static) checkComplex()

Checks for complex type, delegates to internal method Most skulpt users would search here!

Source:

(static) checkIterable(arg) → {boolean}

Use this to test whether or not a Python object is iterable. You should not rely on the presence of tp$iter on the object as a good test, as it could be a user defined class with __iter__ defined or __getitem__ This tests for all of those cases

Parameters:
Name Type Description
arg Object

A Python object

Source:
Returns:

true if the object is iterable

Type
boolean

(static) pyCheckArgs(name, args, minargs, maxargsopt, kwargsopt, freeopt)

Check arguments to Python functions to ensure the correct number of arguments are passed.

Parameters:
Name Type Attributes Description
name string

the name of the function

args Object

the args passed to the function

minargs number

the minimum number of allowable arguments

maxargs number <optional>

optional maximum number of allowable arguments (default: Infinity)

kwargs boolean <optional>

optional true if kwargs, false otherwise (default: false)

free boolean <optional>

optional true if free vars, false otherwise (default: false)

Source:

(static) pyCheckArgsLen(name, nargs, minargs, maxargsopt, kwargsopt, freeopt)

Check arguments to Python functions to ensure the correct number of arguments are passed.

Parameters:
Name Type Attributes Description
name string

the name of the function

nargs number

the args passed to the function

minargs number

the minimum number of allowable arguments

maxargs number <optional>

optional maximum number of allowable arguments (default: Infinity)

kwargs boolean <optional>

optional true if kwargs, false otherwise (default: false)

free boolean <optional>

optional true if free vars, false otherwise (default: false)

Source:

(static) pyCheckType(name, exptype, check)

Check type of argument to Python functions.

Parameters:
Name Type Description
name string

the name of the argument

exptype string

string of the expected type name

check boolean

truthy if type check passes, falsy otherwise

Source:

Sk.builtin

Source:

Classes

bool
float_
func
int_
none
NotImplemented
numtype
object
seqtype

Methods

(static) checkComplex()

Checks for complex type, delegates to internal method Most skulpt users would search here!

Source:

(static) checkIterable(arg) → {boolean}

Use this to test whether or not a Python object is iterable. You should not rely on the presence of tp$iter on the object as a good test, as it could be a user defined class with __iter__ defined or __getitem__ This tests for all of those cases

Parameters:
Name Type Description
arg Object

A Python object

Source:
Returns:

true if the object is iterable

Type
boolean

(static) pyCheckArgs(name, args, minargs, maxargsopt, kwargsopt, freeopt)

Check arguments to Python functions to ensure the correct number of arguments are passed.

Parameters:
Name Type Attributes Description
name string

the name of the function

args Object

the args passed to the function

minargs number

the minimum number of allowable arguments

maxargs number <optional>

optional maximum number of allowable arguments (default: Infinity)

kwargs boolean <optional>

optional true if kwargs, false otherwise (default: false)

free boolean <optional>

optional true if free vars, false otherwise (default: false)

Source:

(static) pyCheckArgsLen(name, nargs, minargs, maxargsopt, kwargsopt, freeopt)

Check arguments to Python functions to ensure the correct number of arguments are passed.

Parameters:
Name Type Attributes Description
name string

the name of the function

nargs number

the args passed to the function

minargs number

the minimum number of allowable arguments

maxargs number <optional>

optional maximum number of allowable arguments (default: Infinity)

kwargs boolean <optional>

optional true if kwargs, false otherwise (default: false)

free boolean <optional>

optional true if free vars, false otherwise (default: false)

Source:

(static) pyCheckType(name, exptype, check)

Check type of argument to Python functions.

Parameters:
Name Type Description
name string

the name of the argument

exptype string

string of the expected type name

check boolean

truthy if type check passes, falsy otherwise

Source:

Sk.builtin

Source:

Classes

bool
float_
func
int_
none
NotImplemented
numtype
object
seqtype

Methods

(static) checkComplex()

Checks for complex type, delegates to internal method Most skulpt users would search here!

Source:

(static) checkIterable(arg) → {boolean}

Use this to test whether or not a Python object is iterable. You should not rely on the presence of tp$iter on the object as a good test, as it could be a user defined class with __iter__ defined or __getitem__ This tests for all of those cases

Parameters:
Name Type Description
arg Object

A Python object

Source:
Returns:

true if the object is iterable

Type
boolean

(static) pyCheckArgs(name, args, minargs, maxargsopt, kwargsopt, freeopt)

Check arguments to Python functions to ensure the correct number of arguments are passed.

Parameters:
Name Type Attributes Description
name string

the name of the function

args Object

the args passed to the function

minargs number

the minimum number of allowable arguments

maxargs number <optional>

optional maximum number of allowable arguments (default: Infinity)

kwargs boolean <optional>

optional true if kwargs, false otherwise (default: false)

free boolean <optional>

optional true if free vars, false otherwise (default: false)

Source:

(static) pyCheckArgsLen(name, nargs, minargs, maxargsopt, kwargsopt, freeopt)

Check arguments to Python functions to ensure the correct number of arguments are passed.

Parameters:
Name Type Attributes Description
name string

the name of the function

nargs number

the args passed to the function

minargs number

the minimum number of allowable arguments

maxargs number <optional>

optional maximum number of allowable arguments (default: Infinity)

kwargs boolean <optional>

optional true if kwargs, false otherwise (default: false)

free boolean <optional>

optional true if free vars, false otherwise (default: false)

Source:

(static) pyCheckType(name, exptype, check)

Check type of argument to Python functions.

Parameters:
Name Type Description
name string

the name of the argument

exptype string

string of the expected type name

check boolean

truthy if type check passes, falsy otherwise

Source: