[Python-ideas] PEP 511: API for code transformers
Random832
random832 at fastmail.com
Mon Jan 18 12:26:30 EST 2016
On Mon, Jan 18, 2016, at 12:04, Yury Selivanov wrote:
> > I think that it depends on how it's implemented. Having a _requirement_
> > that semantics _must_ be preserved suggests that they may not always be
> > applied, or may not be applied in a deterministic order.
>
> It just won't be possible to enforce that "requirement".
I'm not talking about mechanically enforcing it. I'm talking about it
being a documented requirement to write such code, and that people
*should not* use this feature for things that need to be applied 100% of
the time for their applications to work. Either we have to nail down
exactly when and how these things are invoked so that people can rely on
them, or they are only _useful_ for optimizations (and other
semantic-preserving things like instrumentation) rather than arbitrary
transformations.
More information about the Python-ideas
mailing list