Message 312190 - Python tracker

Message312190

Author ned.deily
Recipients Eric Cousineau, eric.smith, ned.deily, ronaldoussoren
Date 2018-02-15.01:08:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1518656931.41.0.467229070634.issue32845@psf.upfronthosting.co.za>
In-reply-to
Content
This had me confused for a while.  But eric.smith's comment is the clue to what's going on here:

> This is the expected behavior, fortunately or not. "math" is not builtin in the sense that is used in that paragraph.

The difference in behavior that you are seeing seems to be due to the fact that the Debian/Ubuntu uses a non-standard build to build-in the standard lib "math" module, whereas the Mac version you are using undoubtedly does not.  You can see this behavior yourself if you build your own version of python (either 2.7 or 3.x) on your Ubuntu system.  You should now see the same behavior you see on the Mac.  For example:

# on a current Debian system
$ /usr/bin/python2.7 -c 'import sys,math;print(sys.modules["math"])'
<module 'math' (built-in)>

# on a current Mac system using the python.org 2.7.14
$ /usr/local/bin/python2.7 -c 'import sys,math;print(sys.modules["math"])'
<module 'math' from '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/math.so'>

So, I don't think this is an issue at all.  Please reopen if you think there is actually a problem here.
History
Date User Action Args
2018-02-15 01:08:53ned.deilysetrecipients: + ned.deily, ronaldoussoren, eric.smith, Eric Cousineau
2018-02-15 01:08:51ned.deilysetmessageid: <1518656931.41.0.467229070634.issue32845@psf.upfronthosting.co.za>
2018-02-15 01:08:51ned.deilylinkissue32845 messages
2018-02-15 01:08:48ned.deilycreate