This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients jonash, pitrou, theller
Date 2011-02-27.15:00:45
SpamBayes Score 2.2560835e-08
Marked as misclassified No
Message-id <1298818846.67.0.721769806084.issue11258@psf.upfronthosting.co.za>
In-reply-to
Content
Here is an excerpt:

	libc.so.6 (libc6,x86-64, OS ABI: Linux 2.6.9) => /lib64/libc.so.6
	libc.so.6 (libc6, OS ABI: Linux 2.6.9) => /lib/libc.so.6

The "OS ABI" thing is not always there:

	libdrm.so.2 (libc6,x86-64) => /usr/lib64/libdrm.so.2
	libdrm.so.2 (libc6) => /usr/lib/libdrm.so.2

As you see, there are two of them with the same name but in a different path. If you return the absolute path, there is a 50% possibility that you are returning the wrong one ;)

There seem to be two key differences between the original implementation and yours:
- the orig impl matches the abi_type at the beginning of the parentheses, yours simply ignores the abi_type (that should have caught my eye, but that regex looked so much like magic that I didn't try to make sense of it :-))
- the orig impl returns the file name from the beginning of the matched line, yours returns the full path from the end of the line

I guess it should be doable to retain the speed benefit while implementing a matching algorithm closer to the original one.
History
Date User Action Args
2011-02-27 15:00:46pitrousetrecipients: + pitrou, theller, jonash
2011-02-27 15:00:46pitrousetmessageid: <1298818846.67.0.721769806084.issue11258@psf.upfronthosting.co.za>
2011-02-27 15:00:46pitroulinkissue11258 messages
2011-02-27 15:00:45pitroucreate