Stefan Behnel, 23.02.2014 19:51: > Cython has typed > assignments, so a straight forward idea would be to handle TypeErrors in > assignments like this: > > cdef str s > s = x except TypeError: str(x) Similar code in Python would be this: from array import array x = array('i', [1,2,3]) value = "123" x[0] = value except TypeError: int(value) > However, I guess that would similarly counter the idea of exception > handling in an *expression*, and the correct and non-ambiguous way to do > this would be to spell out the try-except block. Stefan
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4