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 rhettinger
Recipients benjamin.peterson, rhettinger, steven.daprano
Date 2009-01-01.01:31:55
SpamBayes Score 0.0038743482
Marked as misclassified No
Message-id <1230773516.92.0.617860643085.issue4795@psf.upfronthosting.co.za>
In-reply-to
Content
This can be simplified to just:

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

No need for patterns like:

  if cond:
     return True
  return False
History
Date User Action Args
2009-01-01 01:31:57rhettingersetrecipients: + rhettinger, benjamin.peterson, steven.daprano
2009-01-01 01:31:56rhettingersetmessageid: <1230773516.92.0.617860643085.issue4795@psf.upfronthosting.co.za>
2009-01-01 01:31:56rhettingerlinkissue4795 messages
2009-01-01 01:31:55rhettingercreate