Evan Hubinger

Results 136 comments of Evan Hubinger

@EmilRehnberg This is intended behavior—MyPy is correctly warning you that you're redefining `factorial`, since you first define it as `def factorial(0) = 1` and then later redefine it by adding...

@EmilRehnberg #510 would not resolve this issue, as even after you give the function a unique name you still need to reassign it if you want it to override the...

For reference, the currently available Emacs modes appear to be [this one](https://github.com/NickSeagull/coconut-mode) and [this one](https://github.com/padawanphysicist/coconut-mode).

@ArneBachmann That's a good point! Putting this on the v1.3.1 milestone.

@narfanar Instead of ``` if isinstance(thing, Sequence) and thing[0] == 1: ... ``` do ``` no_ind = object() def try_index(obj, ind): try: return obj[ind] except: return no_ind check_ind = try_index(thing,...

@ArneBachmann I'd rather just solve #320 than make this available--this is the sort of information that really should only be internal to Coconut.

@JeffreyBenjaminBrown I think this needs to be documented better, because my thinking on how best to do this in Coconut has evolved a lot since I wrote most of the...

@3noch Yeah, you're totally right on that one. I'm not sure what the use case would be for totality checking, though--what sort of situation are you thinking about where you...

@3noch The `Union[int, float, None]` syntax @eindiran is referring to is [standard Python typing syntax](https://docs.python.org/3/library/typing.html#typing.Union) which can be checked by e.g. mypy.

@JavaScriptDude Type checking in match statements (as documented [here](https://coconut.readthedocs.io/en/master/DOCS.html#match)) is just `data_type(arguments)`. For example: ```python class Tree data Empty() from Tree data Leaf(n) from Tree data Node(l, r) from Tree...