Author steven.daprano
Recipients steven.daprano
Date 2008-12-31.22:47:05
SpamBayes Score 0.000510539
Marked as misclassified No
Message-id <>
The inspect isSOMETHING() functions all return True or False, except 
for isgeneratorfunction(), which returns True or None.

The body of the function is very brief:

if (isfunction(object) or ismethod(object)) and \
        object.func_code.co_flags & CO_GENERATOR:
        return True

The behaviour can be made consistent with the other routines by either 
appending "else: return False", or changing the body to:

return bool(
  (isfunction(object) or ismethod(object)) and
   object.func_code.co_flags & CO_GENERATOR)
Date User Action Args
2008-12-31 22:47:07steven.dapranosetrecipients: + steven.daprano
2008-12-31 22:47:07steven.dapranosetmessageid: <>
2008-12-31 22:47:06steven.dapranolinkissue4795 messages
2008-12-31 22:47:05steven.dapranocreate