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 sschwarzer
Recipients
Date 2005-01-28.16:44:21
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=383516

Hi Facundo

The problem still exists in both Python 2.3.4 and 2.4.

A possible test case is:

import inspect
import unittest

class TestIsclass(unittest.TestCase):
    def test_instance_with_getattr(self):
        class Cls:
            def __getattr__(self, name):
                return "not important"
        obj = Cls()
        # obj is not a class
        self.failIf(inspect.isclass(obj))
History
Date User Action Args
2007-08-23 14:12:24adminlinkissue718532 messages
2007-08-23 14:12:24admincreate