New to hy, looking for another set of eyes on if statement #2551
-
I'm writing a little client/server thing to learn Hy (loving it so far!), and there's an if statement that I don't understand why it is giving me an error, I hope someone can see what is going on, here's the code, the lines that are (attempting to be) bolded are the issue, and this is the error I get: hostname[~/drop]% hy server.hy
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
|
Beta Was this translation helpful? Give feedback.
-
that's perfect, thanks... any suggestions on how to handle an exception w/ a pass in Hy? This is mostly being done for timeouts ; (print "timed out"))))) I would normally put a pass there as well, it seems putting nothing there works, but I wanted to make sure I'm doing it correctly. In this case, the exception should be a no-op. I am ignoring socket timeout exceptions, if I don't have the handler the server stops. If I'm reading your comment correctly though, a "pass" is being implicitly generated there? |
Beta Was this translation helpful? Give feedback.
if
needs a third argument.