Fwd: Re: Delay evaluation of annotations

What you are proposing is a very large and controversial feature change. Just repeating that you think there documented 10-year old behavior is an accident doesn't make it so. This is ABSOLUTELY impossible for 3.6. my feeling is is probably oppose it for 3.7, bit that is the soonest timeframe that is even conceivable. Here's a quick, only slightly contrived, example where i want an annotation to have a side effect: def foo(a, b) -> logdef(): ... This might be used as part of a tracing, cod coverage, or timing library. Obviously it would need to do some magic to get more info about the function being logged, bit that's possible. And yes, I can think of other ways to achieve this effect (decorators maybe), but you want to make change to prohibit this use that might be in production for ten years.
participants (1)
-
David Mertz