[Python-Dev] addressing distutils inability to track file dependencies

Tim Peters tim.one@comcast.net
Fri, 14 Jun 2002 13:00:06 -0400


[Tim, on the debug-build sys.getobjects()]
> ...
> You can also pass it a type after the int, and, if you do, only objects of
> that type get returned.

Speaking of which, that become a lot more pleasant in 2.2, as new-style
classes create new types, and most builtin types have builtin names.  You
can pee away delighted weeks pondering the mysteries <wink>.  For example:

Python 2.3a0 (#29, Jun 13 2002, 17:06:59) [MSC 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
[8285 refs]
>>> sys.getobjects(0, int)
[17, 19, 20, 18, 14, 512, 56, 448, 128, 256, 512, 1024, 2048,
 49152, 40960, 4096, 32768, 24576, 8192, 16384, 61440, 4095,
 9, 7, 6, 5, 10, 32, 16, 64, 4096, 128, 16384, 32768, 512, 1024,
 256, 32767, 511, -4, -1, 15, 11, 8, 22, 4, 21, 23, 503316480, 65535,
 2147483647, 1, 0, 3, 2, 33751201]
[8348 refs]
>>>

Why would the first int Python allocates be 33751201?  The answer is clear
with a little hexification:

>>> hex(_[-1])
'0x20300a1'
[8292 refs]
>>>

Or, if that answer isn't clear, you should unsubscribe from Python-Dev
immediately <wink>.