The "type" type dream

bearophile bearophileHUGS at lycos.com
Tue Nov 25 23:39:13 PST 2008


Robert Fraser:
> Awesome! That's one of the coolest OSS projects out there!

Thank you ^_^


> It would still only work for private (non-exported) function in D.

ShedSkin (SS) can also be used to create modules that you can import from Python.
I have solved this problem in the following way: in a Python module there can be a part that runs only when you run the module by itself, and that doesn't run when you import the module (under if __name__ == "__main__":). In such part you can put module tests. SS digests the code present into such tests even when you compile the module to create a python extension, giving the module the missing types, the ones that come from the calling Python code :-) You need to re-compile the module if you want to add new tests with new types, but for the current purpose of SS this is not a problem.

Bye,
bearophile



More information about the Digitalmars-d mailing list