2013.02.09 - programming wat

as a part of exercising my (basic) python skills i've decided to write short HTML links extractor and combiner, to download a series of lectures on cryptography (which, btw i highly recommend!) to disk. as an experienced C++ developer, having to increment variable, as a part of the loop, i typed:


and… it didn't increment. wtf? quick search showed that python uses “+” and “-” as sign indicators, for number and thus parses “++i” as “+(+i)”, which gives “i”. WAT? and this is how i reminded myself of an short, excellent talk about “nice” pitfalls in rubby and javascript.

good news:

  1. just learned something new
  2. had some fun

bad news:

  1. got late
  2. want sleep
blog/2013/02/09/programming_wat.txt · Last modified: 2021/06/15 20:09 by
Back to top
Valid CSS Driven by DokuWiki Recent changes RSS feed Valid XHTML 1.0