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 kermode
Recipients benjamin.peterson, georg.brandl, gpolo, kermode
Date 2008-12-31.21:17:53
SpamBayes Score 1.69401e-05
Marked as misclassified No
Message-id <>
The claim "merely" syntactic sugar implies that the inverse is also
true, the decorator expression:

def foo():

can be replaced it with:

def foo():
foo = do_something(foo)

This is guaranteed if do_something is purely functional, but breaks if
do_something has side effects. The example was for illustration only. A
real application would likely access the parent frame. Whether or not
this is a questionable practice, it happens.

However, the issue is one of definitions. Is the phrase "merely
syntactic sugar" misleading? In this case it makes promises that may not
be kept.
Date User Action Args
2008-12-31 21:17:54kermodesetrecipients: + kermode, georg.brandl, benjamin.peterson, gpolo
2008-12-31 21:17:54kermodesetmessageid: <>
2008-12-31 21:17:53kermodelinkissue4793 messages
2008-12-31 21:17:53kermodecreate