[Tutor] Python and memory allocation
Mark Lawrence
breamoreboy at yahoo.co.uk
Sat Oct 26 16:48:36 CEST 2013
On 26/10/2013 13:20, Steven D'Aprano wrote:
> On Thu, Oct 24, 2013 at 05:21:56PM +0000, Dave Angel wrote:
>
>> If you
>> want a surprise, try the following simple program some time.
>>
>> import sys
>> print(sys.modules)
>>
>> when I tried that interactively on 2.7, it printed some 240+ names.
>
> Wow. What were you doing? Ah, I bet you had imported numpy or similar!
> numpy brings in a lot.
>
This reminded me that work has been done to reduce the number of imports
at startup, see http://bugs.python.org/issue19205 and
http://bugs.python.org/issue19325
--
Python is the second best programming language in the world.
But the best has yet to be invented. Christian Tismer
Mark Lawrence
More information about the Tutor
mailing list