FYI: I managed to solve the problem. I simply took the third parameter out of the parameter list and initialized the variable inside the function: def FormatPreis( v, n=2, thou=regex.compile( "\([0-9]\)\([0-9][0-9][0-9]\([,.]\|$\)\)").search) becomes def FormatPreis( v, n=2 ) The new code is a little bit less efficient. But this doesn't hurt us. Special thanks to Pavlos Christoforou <pavlos@gaaros.com>! -- connection reset by Peer _______________________________________________________________________ Dr. Peer Griebel Tel. +49 7581 4831 23 Geschäftsführer Fax. +49 7581 4831 11 Knoll Informationssysteme GmbH http://www.knoll-is.de Dreiköniggasse 17 mailto:peer@knoll-is.de 88348 Saulgau privat: mailto:peer.griebel@gmx.de