Pattern transform

a long time we speak about it.... Here it is.
it would be so cool to be able to write a pattern in plain Python instead of this ...