Author serhiy.storchaka
Recipients Carl Ekerot, loewis, serhiy.storchaka, xiang.zhang
Date 2016-11-04.20:58:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> It doesn't solve the case when an identifier or number is used as a function:

In the first case we should convert an argument to integer.

    ns = {}
    exec('''if True:
        def func(arg):
            n = int(arg)
            return {}
        '''.format(plural), ns)
    return ns['func']

Or raise an exception if argument is not integer.

In the second case I think we can just left it as is. This is not valid C expression.

Or we can add try/except in above code and convert TypeError to ValueError if this is more preferable exception.
Date User Action Args
2016-11-04 20:58:07serhiy.storchakasetrecipients: + serhiy.storchaka, loewis, xiang.zhang, Carl Ekerot
2016-11-04 20:58:07serhiy.storchakasetmessageid: <>
2016-11-04 20:58:07serhiy.storchakalinkissue28563 messages
2016-11-04 20:58:07serhiy.storchakacreate