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.

作者 daniel.urban
收信人 amaury.forgeotdarc, benjamin.peterson, daniel.urban, georg.brandl, gvanrossum, ncoghlan, pwerneck, rodsenra, terry.reedy
日期 2011-04-20.19:26:38
SpamBayes Score 0.0014588609
Marked as misclassified
Message-id <1303327598.83.0.887294701404.issue1294232@psf.upfronthosting.co.za>
In-reply-to
内容
That may be, but with my latest patch, this works (func is a function):

class X(metaclass=func):
    pass

But this blows up with a TypeError:

class X(object, metaclass=func):
    pass

Is this the desired behaviour? Or should we disallow non-class metaclasses in every case? (And what about backwards-compatibility?)
历史
日期 用户 动作 参数
2011-04-20 19:26:38daniel.urban修改recipients: + daniel.urban, gvanrossum, georg.brandl, terry.reedy, amaury.forgeotdarc, ncoghlan, rodsenra, pwerneck, benjamin.peterson
2011-04-20 19:26:38daniel.urban修改messageid: <1303327598.83.0.887294701404.issue1294232@psf.upfronthosting.co.za>
2011-04-20 19:26:38daniel.urban链接issue1294232 messages
2011-04-20 19:26:38daniel.urban创建