Page MenuHomePhabricator

Adds __str__ support to python

Authored by stellaraccident on Aug 16 2020, 8:55 PM.


  • Also raises an exception on parse error.
  • Removes placeholder smoketest.
  • Adds docstrings.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptAug 16 2020, 8:55 PM
stellaraccident requested review of this revision.Aug 16 2020, 8:55 PM
ftynse accepted this revision.Aug 17 2020, 3:57 AM
ftynse added inline comments.

Please fix linter warnings. MLIR uses camelCase for variables, I've seen kConstantName for constants.


What does the + do?

This revision is now accepted and ready to land.Aug 17 2020, 3:57 AM

Fix lint and remove lambda decay.


Thanks - I started doing that then second guessed thinking that was just Google style (too many style switches recently).


It is just the unary plus but the effect is subtle: It causes an explicit decay of a (non capturing) C++ closure to a raw function pointer.

Here is a good explanation:

I just checked that it is not required in this case and removed it (there might be a compiler version dependency: I remember that on older compilers we had to use this idiom frequently when bridging C/C++ callbacks on prior projects).

This revision was landed with ongoing or failed builds.Aug 17 2020, 9:47 AM
This revision was automatically updated to reflect the committed changes.