Author eli.bendersky
Recipients Arfrever, effbot, eli.bendersky, eric.araujo, ezio.melotti, flox, scoder
Date 2012-02-11.08:58:00
SpamBayes Score 7.07274e-07
Marked as misclassified No
Message-id <1328950680.67.0.791108024566.issue13988@psf.upfronthosting.co.za>
In-reply-to
Content
>> I find it perfectly legitimate to run Python code from a C module.
Certainly not a hack. We all know that most non-trivial functionality can
be expressed much easier in Python than in C, that's why we use Python
after all. In particular, defining a class with attributes and methods is a couple of lines of code in Python, but a huge amount of code in C. Avoiding the complexity of writing everything in C, or even of splitting the code in a harder to understand way, is worth it.
<<

There can be arguments both way, but if we follow the lead of existing standard extension modules, the tendency is clearly not to use PyRun_String. Many C extensions use functionality from Python, but none does it the "bootstrap way". Why is that? Is there a good reason, or is it just convention?
History
Date User Action Args
2012-02-11 08:58:00eli.benderskysetrecipients: + eli.bendersky, effbot, scoder, ezio.melotti, eric.araujo, Arfrever, flox
2012-02-11 08:58:00eli.benderskysetmessageid: <1328950680.67.0.791108024566.issue13988@psf.upfronthosting.co.za>
2012-02-11 08:58:00eli.benderskylinkissue13988 messages
2012-02-11 08:58:00eli.benderskycreate