RosettaCommons / binder

Binder, tool for automatic generation of Python bindings
MIT License
321 stars 66 forks source link

Post/Pre increment/decrement operator confusion #226

Open zwimer opened 2 years ago

zwimer commented 2 years ago

Both ++a and a++ map to plus_plus, though as one the differentiation between them still exists via different overrides.

That is ++a maps to plus_plus() and a++ to plus_plus(0); which makes sense given how the operators are defined in C++.

A feature add could be changing plus_plus to post_increment / pre_increment depending on which is detected. All of this is true with -- too.

zwimer commented 2 years ago

This was documented via https://github.com/RosettaCommons/binder/pull/229

The rest of this issue is just a feature request at this point.

zwimer commented 2 years ago

Feature add PR: https://github.com/RosettaCommons/binder/pull/238