How lazy is evaluation in Python? If I have code that looks like
logging.debug('My very long list: %s' % list(x for x in long_generator))
and the logging effective level is such that debug messages are ignored, do I incur a performance penalty for having this line?