A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-May/024644.html below:

[Python-Dev] True division in embedded Python

[Python-Dev] True division in embedded PythonTim Peters tim.one@comcast.net
Thu, 30 May 2002 00:02:37 -0400
[Bjorn Pettersen]
> ...
> Nope, we just want the advantage of the best language around while still
> using our 900KLoc of C++ libraries <wink>.

Then rather than play with true division now, you'll have a lot more fun
rewriting that in 9 lines of Python; C++/Python ratios of a million are
common for experienced Python programmers, but as a beginner don't feel bad
if you only get a factor of 100,000 savings.  By the way, you should become
a PSF sponsor too, and especially if you believed that <wink>.

> ...
> And if I'm reading the source correctly all I would have to do when
> embedding Python would be to set Py_DivisionWarningFlag = 1?

If you're trying to get the effect of passing -Qwarn to a standalone Python,
yes, that's all you need to do.  And #include'ing Python.h is all you need
to do to get at all names in Python's C API (Py_DivisionWarningFlag among
them).  Have fun!





RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4