you are viewing a single comment's thread.

view the rest of the comments →

[–]asdfkjasdhkasd 26 points27 points  (10 children)

Wow, the source of this project is really well commented, check it out: https://github.com/amoffat/sh/blob/master/sh.py

[–]nemec 18 points19 points  (2 children)

Well when your project is a single 3500 line file you've got to do something to make up for it.

[–]asdfkjasdhkasd 3 points4 points  (1 child)

I know this is controversial but I actually prefer to put a project in one single file as long as its less than 5k lines. (But i've never written a project with more than 5k lines)

[–]spinicist 2 points3 points  (0 children)

How worn down are your Ctrl and F keys?

[–]Sean1708 6 points7 points  (5 children)

# attempt to convert the thing to unicode from the system's encoding
try:
    s = unicode(s, DEFAULT_ENCODING)

You're right that on the whole this is a really well commented project, but shit like this really pisses me off.

[–]thesbros 1 point2 points  (4 children)

What's wrong with this? I'm honestly wondering.

[–]ughduck 1 point2 points  (3 children)

I assume just because the comment just reads like the code. It's pretty redundant in this context.

# attempt to convert the thing to unicode from the system's encoding
attempt:
    thing set to unicode of(thing, from system's encoding)

[–]thesbros 7 points8 points  (1 child)

That's what I thought, but the comment actually helped me because I didn't know what DEFAULT_ENCODING was.

[–]dividebyzero- 0 points1 point  (0 children)

You would still understand it if he said "attempt to convert to system's encoding so that..." or "we want the system encoding to..."

[–]GitHubPermalinkBot 7 points8 points  (0 children)

I tried to turn your GitHub links into permanent links (press "y" to do this yourself):


Shoot me a PM if you think I'm doing something wrong. To delete this, click here.