Wrapping Python - A function wrapping template

Tom S h3r3tic at remove.mat.uni.torun.pl
Tue Jun 13 15:47:51 PDT 2006


Daniel Keep wrote:
> I deleted the code a while back, but it was basically using these
> nested, recursive templates so that I could do this:
> 
> alias StartModule!("Quxx").AddMethod!("foo",
> PydWrap!(foo)).AddMethod!("bar", PydWrap!(bar)).EndModule!() QuxxModule;
> 
> However, D complained of various things.  Funny thing was, THIS worked:
> 
> alias StartModule!("Quxx") t1;
> alias t1.AddMethod!("foo", PydWrap!(foo)) t2;
> alias t2.AddMethod!("bar", PydWrap!(bar)) t3;
> alias t3.EndModule!() QuxxModule;
> 
> But I figured that was as much, if not more verbose then doing it
> "long-hand", so I gave up.


Could this: http://158.75.59.9/~h3/tmp/tmp4.d possibly help in any way ?



-- 
Tomasz Stachowiak  /+ a.k.a. h3r3tic +/



More information about the Digitalmars-d mailing list