On Jul 17, 2006, at 11:25 AM, Armin Rigo wrote: > Hi Bob, > > On Thu, Jul 13, 2006 at 12:58:08AM -0700, Bob Ippolito wrote: >>> @main >>> def whatever(): >>> ... >> >> It would probably need to be called something else, because main is >> often the name of the main function... > > Ah, but there is theoretically no name clash here :-) > > @main # <- from the built-ins > def main(): # <- and only then set the global > ... > > > Just-making-a-stupid-point-and-not-endorsing-the-feature-ly yours,
Of course it *works*, but it's still overriding a built-in... Who knows when assignment to main will become a SyntaxError like None ;) -bob _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com