Hacker Newsnew | comments | show | ask | jobs | submit login

Of course, that's mostly pylons code. The only information I glean from here is:

1. FreeBSD 6.2

2. Pylons

3. /home/ri/hgreddit




Missed one: hgreddit => Mercurial.

-----


"... missed one: hgreddit => Mecurial ..."

And Paste. The most interesting thing I saw was the bug that caused it found right at the bottom:

  "... unindent does not match any outer indentation level (account.py, line 68) ..."
This is such a pain with Python (having to line the indentation up) and is so trivial. Wonder how it got through testing? They do testing on reddit don't they?

-----


If you find indentation to be a pain in Python, you haven't configured your editor properly.

-----


"... If you find indentation to be a pain in Python, you haven't configured your editor properly. ..."

While it's easy to config your own editor [0]. There are other factors

* uncommonly used editors [1]

* other users/developers

Of the two, other developers is the biggest pain. You have to make sure each developers editor conforms to your coding standards. [1] But making "quick changes" on the server, can short-cut such safeguards.

[0] http://wiki.python.org/moin/HowToEditPythonCode

[1] http://wiki.python.org/moin/PythonEditors

-----


Spez said he uncommented something on the live server.

-----


Wow, I can't believe python doesn't have something similar to ruby's

    ruby -c foo.rb

-----


Third party tools like the excellent pylint exist. And of course, your unit tests should verify that your code is free of syntax errors too, right?

Only problem is, the guy edited the code directly on the live server without testing.

-----


Turns out there is a compileall.py script in the standard distribution that does the trick; there is also the py_compile module and the 'compile' function (though it takes a string).

-----




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: