![](https://secure.gravatar.com/avatar/5615a372d9866f203a22b2c437527bbb.jpg?s=120&d=mm&r=g)
On Fri, Mar 15, 2019 at 08:10:58PM +0100, francismb wrote:
Not really. For example, addition of syntax like "async" and "yield" fundamentally changes the meaning of "def", in ways that *could not* be fully emulated in earlier Pythons. The semantics simply were impossible to produce -- that's why syntax extensions were necessary. But here, the code for versions before that change (e.g. aync) also worked on the new versions? there was not need to translate anything to
On 3/15/19 4:54 AM, Stephen J. Turnbull wrote: the new version as it was a backward compatible change. To use the new feature you have to explicitly use that feature. If that so far correct?
No, it is not a backwards compatible change. Any code using async as a name will fail. py> sys.version '3.8.0a2+ (heads/pr_12089:5fcd3b8, Mar 11 2019, 12:39:33) \n[GCC 4.1.2 20080704 (Red Hat 4.1.2-55)]' py> async = 1 File "<stdin>", line 1 async = 1 ^ SyntaxError: invalid syntax -- Steven