Skip to content

Conversation

@takluyver
Copy link
Contributor

With these fixes, depyc works on itself on Python 3.4.

  • MAKE_FUNCTION now expects a name on the top of the stack, then the code object. The name appears to be redundant with the name embedded in the code object, so for now I discard it.
  • The TryExcept and TryFinally AST nodes were unified into a single Try node. Added support for this.

I'm assuming that there's no need to support Python 3 versions earlier than 3.3; if there is, extra branches will be needed for that.

All the affected code is in py3op functions, so operation on Python 2 should be unaffected.

wr_long doesn't seem to exist, but neither of these names are used in
the module anyway.
The name is also in the code object, so for now the name from the stack
is ignored; this seems to work OK.
This combines TryExcept and TryFinally handlers from earlier versions.

Try is used in Python 3.3 and above.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant