<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Lib/test/test_profile.py, branch 2.3</title>
<subtitle>Python interpreter</subtitle>
<id>http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Lib/test/test_profile.py?h=2.3</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Lib/test/test_profile.py?h=2.3'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2001-10-04T05:36:56Z</updated>
<entry>
<title>Whitespace normalization.</title>
<updated>2001-10-04T05:36:56Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-10-04T05:36:56Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=527e64fd68046cb6e2ff35afaf077160346d37ff'/>
<id>urn:sha1:527e64fd68046cb6e2ff35afaf077160346d37ff</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Hopefully fix the profiler right.  Add a test suite that checks that</title>
<updated>2001-10-04T00:58:24Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-10-04T00:58:24Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=f137f75ab82019b7b4db6d45bd69e2c0b155b2eb'/>
<id>urn:sha1:f137f75ab82019b7b4db6d45bd69e2c0b155b2eb</id>
<content type='text'>
it deals correctly with some anomalous cases; according to this test
suite I've fixed it right.

The anomalous cases had to do with 'exception' events: these aren't
generated when they would be most helpful, and the profiler has to
work hard to recover the right information.  The problems occur when C
code (such as hasattr(), which is used as the example here) calls back
into Python code and clears an exception raised by that Python code.
Consider this example:

    def foo():
        hasattr(obj, "bar")

Where obj is an instance from a class like this:

    class C:
        def __getattr__(self, name):
            raise AttributeError

The profiler sees the following sequence of events:

    call (foo)
    call (__getattr__)
    exception (in __getattr__)
    return (from foo)

Previously, the profiler would assume the return event returned from
__getattr__. An if statement checking for this condition and raising
an exception was commented out...  This version does the right thing.
</content>
</entry>
</feed>
