Submitted by max on Tue, 2006-04-25 23:58.
book | ize | ize v1.0.1
Ize is a python module providing a set of function decorators.
The main functionalities that it offers are :
- operator support for functions
- type checking
- customisable trace
- partial call of function (as the haskell curry)
- decorators and metaclass supports
Decorators helpers allow to "post-decorate" whole modules or functions sets, so that type checking and traces (for exemple) can be be easily disabled, removed (to export) or added to extern module.
Download now !
Submitted by max on Tue, 2006-05-16 23:38.
LightMixer v1.0.0 | swf | tutorial
Video demo of the LightMixer Script.
This script allows quick light manipulation and grouping.
This file must be opened with your favorite explorer.
Submitted by max on Mon, 2006-05-15 11:30.
ize v1.0.1 | pdf | script
Full distribution. include manual.
Submitted by max on Mon, 2006-05-15 11:23.
ize v1.0.1 | script | zip
Just the package. Must be dezipped into your site-package directory.
Click to Download below.
Submitted by max on Mon, 2006-05-15 01:06.
ize v1.0.1 | typechecker
In addition to docstring type checking that can be used individually with @tize or mass decorator", external string can also be used. In that case, the name of the type declaration will be used .For that we have two functions :
- post_checkize(types, dico)
Apply types declaration to member of dico. This can be usefull if you want to separate the types declaration from the code, as header in c++) or to export code without typechecker
def add(x, y):
Submitted by max on Sun, 2006-05-14 20:05.
decorator | ize v1.0.1 | typechecker
The tize decorator provides powerfull typechecking using docstring using a syntax similar to haskell syntax.
Each line of the docstring is threated as a potential type declaration. Lines that can't be parsed are simply ignored.
Multiples type declarations are combined within a OR disjonction, i.e. the function must only verify one line at a given time.
Type declaration must of the form :
[ name] '::' [ arguments ] [ '->' | '=>' return]
- name is not used and is here only for doc conveniance.
- arguments is the type of each argument of the function.
Submitted by max on Sun, 2006-05-14 15:35.
ize v1.0.1 | module | typechecker
The typecheker modules provides a powerfull in-docstring typeching facility. By typechecking we mean verification of the type of arguments and returned object og functions.
At the moment, typechecher is a front end of typecheck using tpg as parser. You must have these modules installed to be able to use typechecker.
Need of typechecking
One of the most advantage of python is that it's a typeless langage. It's interesting because it allows to write code faster - you don't need to declare type - but in many cases debugging is harder - you don't know the exact source of error. So, if for very small project, typeless langage is faster, for bigger project, typechecking could be very usefull by reducing debugging time.
Submitted by max on Fri, 2006-05-05 02:07.
class | ize v1.0.1
The basic Tracer is the base class for tracer. It owns a formater and do nothing. It must be derived. PrintTracer and StackedTracer are Tracer.
- formater a formater. Initialy a TraceFormatter
- format_call(self,__f__, a, k)
- format_return(self,__f__, a, k, returned)
- enter(self,__f__, a, k)
Call at function entry. Do nothing.
- exit(self,__f__, a, k, r)
Call at function exit. Do nothing.