Vocabularypython.
syntaxSyntaxPY-METHODS: class => name-effects ;
Inputs and outputs| class | name of a class to associate the bindings with |
| name-effects | pairs of names and effect declarations of methods to create |
Word descriptionCreates factor words that acts as properties and getters and can work on any python object.
ExamplesPY-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