PY-METHODS:
Syntax for python calls from factor

Prev:PY-QUALIFIED-FROM:


Vocabulary
python.syntax

Syntax
PY-METHODS: class => name-effects ;


Inputs
None

Outputs
None

Word description
Creates factor words that acts as properties and getters and can work on any python object.

Examples
PY-FROM: zipfile => ZipFile ( name mode -- file ) ; PY-METHODS: ZipFile => namelist ( self -- names ) ; ! Then use the declarations like this "name-of-zip.zip" >py "r" >py ZipFile namelist py>


Definition