kachayev / fn.py

Functional programming in Python: implementation of missing features to enjoy FP
Other
3.35k stars 204 forks source link

Bugfix underscore format #56

Closed Digenis closed 10 years ago

Digenis commented 10 years ago

A forgotten tuple addition rendered underscore incapable of formatting after collecting more than one constant (see tests for more info).

An issue demonstrated in the tests remains open. underscore formats multiple left side constants with the opposite order. str(1 + 2 * _) # (x1) => (2 + (1 * x1)) I welcome any suggestions on this.

P.S. Regarding the Travis build, it fails because of what the test uncovered.

Digenis commented 10 years ago

Any idea what to do about the last bug? It gets triggered when ordering operators in reverse priority order between constants.

kachayev commented 10 years ago

@Digenis Yes, I fixed it, you can just check latest commits to understand what's going on. The problem was that composable formatter was built from uniformed %r signs. Which doesn't work when you need to reverse implication order.