Evan Hubinger

Results 136 comments of Evan Hubinger

@narfanar This was replaced with infix function notation, e.g. `` 5 `mod` 3 ``. Though this might still be worth implementing, so I'll reopen it.

Plan is to compile ``` def x `OP` y = ... x `OP` y (`OP`) ``` to the equivalent with `OP` replaced with `_coconut_op_U_U_...`.

Hmmm... I'm just realizing that the problem with this is that comments don't get added to `Compiler.comments` until `Compiler.comment_handle` is called, which only happens at the end of the line...

I think the solution to this has to be to store strict errors/warnings rather than raising them immediately until `Compiler.endline_handle` is hit or parsing finishes, at which point stored errors...

@acdimalev I believe this is currently fixed on `coconut-develop`--if you `pip install -U coconut-develop`, does that fix the problem?

@acdimalev As a simple temporary fix, you should be able to pass an explicit `--target` to make this go away.

@Hibou57 Under `--target universal` (the default target), Coconut will compile `from io import StringIO` into ```python if sys.version_info < (2, 7): from StringIO import StringIO else: from io import StringIO...

Also potentially in loops when using loop variables, since this leads to infinite recursion.

Problem is that this doesn't actually help, since now the original `f` doesn't have a unique name.

@pavelbraginskiy To support this anywhere an expression is valid, I think the right way to compile this will actually be compiling ```python [f(a := b) for b in bs] ```...