Wrapping Python - A function wrapping template
Daniel Keep
daniel.keep.lists at gmail.com
Wed Jun 14 03:40:55 PDT 2006
Tom S wrote:
> 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 ?
>
It just might :) Thanks for that.
-- Daniel
--
Unlike Knuth, I have neither proven or tried the above; it may not even
make sense.
v2sw5+8Yhw5ln4+5pr6OFPma8u6+7Lw4Tm6+7l6+7D
i28a2Xs3MSr2e4/6+7t4TNSMb6HTOp5en5g6RAHCP http://hackerkey.com/
More information about the Digitalmars-d
mailing list