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 techtonik
Recipients techtonik
Date 2009-09-03.07:20:16
SpamBayes Score 2.4416686e-08
Marked as misclassified No
Message-id <1251962419.95.0.109154121907.issue6829@psf.upfronthosting.co.za>
In-reply-to
Content
It is an error to try to inherit from function and the error message in 
this case is:
{{{
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "m:\p\pb.py", line 4, in <module>
    class PostgreSQLConnection(DatabaseConnection):
TypeError: Error when calling the metaclass bases
    function() argument 1 must be code, not str
}}}

Something like 'Impossible to inherit from function' will clear 
confusion state from users unfamiliar with metaclasses.
{{{
def DatabaseConnection(object):
    pass

class PostgreSQLConnection(DatabaseConnection):
    pass
}}}
History
Date User Action Args
2009-09-03 07:20:20techtoniksetrecipients: + techtonik
2009-09-03 07:20:19techtoniksetmessageid: <1251962419.95.0.109154121907.issue6829@psf.upfronthosting.co.za>
2009-09-03 07:20:17techtoniklinkissue6829 messages
2009-09-03 07:20:17techtonikcreate