Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PEP8 style guide #78

Closed
daniilr opened this issue Jul 4, 2013 · 10 comments
Closed

PEP8 style guide #78

daniilr opened this issue Jul 4, 2013 · 10 comments

Comments

@daniilr
Copy link
Contributor

daniilr commented Jul 4, 2013

Why don't you use PEP8 style guides?
http://www.python.org/dev/peps/pep-0008/

@bear
Copy link
Owner

bear commented Jul 4, 2013

The original author didn't (for whatever reason he had) and when I merged
in my code way back in the day I also didn't - never had a reason to use it
really. The code is a library so what style it uses is not a huge issue IMO

On Wed, Jul 3, 2013 at 11:34 PM, Daniil notifications@github.com wrote:

Why don't you use PEP8 style guides?
http://www.python.org/dev/peps/pep-0008/


Reply to this email directly or view it on GitHubhttps://github.com//issues/78
.

Bear

bear@xmpp.org (email)
bear42@gmail.com (xmpp, email)
bear@code-bear.com (xmpp, email)
http://code-bear.com/bearlog (weblog)

PGP Fingerprint = 9996 719F 973D B11B E111 D770 9331 E822 40B3 CD29

@daniilr
Copy link
Contributor Author

daniilr commented Jul 4, 2013

PEP8 styled code looks more familiar for many python developers (especially that ones who uses IDE with automatic style correctors). BTW 4 spaces per indentation levels looks way better as I think. So PEP8 code will be more comfortable to contribute to.
Can I fix it?

@bear
Copy link
Owner

bear commented Jul 4, 2013

The question of 2 spaces or 4 is irrelevant - all modern IDE's and editors
can be set to honour any space/tab combination a dev wants to use.

The question of comfortable code is also not a primary reason - this
codebase has been thru many many changes so is kinda crufty and with it
being maintenance code, it's never comfortable PEP8 not withstanding.

The better way to approach this issue would have been to submit the pull
request honouring the style in use and then to start a conversation with
the other developers about the issue, not to start with changes within your
first pull request and to start telling us that we are doing it wrong and
should change.

I have had this discussion (and many variants of it) more times than I can
remember, i've been doing this for a long time, so i'm not just saying NO
but am open to having the discussion if it truly is an issue.

Post v1.0 release was going to be the time when I started asking questions
like you could have raised.

On Thu, Jul 4, 2013 at 1:46 AM, Daniil notifications@github.com wrote:

PEP8 styled code looks more familiar for many python developers
(especially that ones who uses IDE with automatic style correctors). BTW 4
spaces per indentation levels looks way better as I think. So PEP8 code
will be more comfortable to contribute to.
Can I fix it?


Reply to this email directly or view it on GitHubhttps://github.com//issues/78#issuecomment-20460036
.

Bear

bear@xmpp.org (email)
bear42@gmail.com (xmpp, email)
bear@code-bear.com (xmpp, email)
http://code-bear.com/bearlog (weblog)

PGP Fingerprint = 9996 719F 973D B11B E111 D770 9331 E822 40B3 CD29

@daniilr
Copy link
Contributor Author

daniilr commented Jul 4, 2013

I'm kinda new here and don't have experience of collaboration with other developers at all. Sorry for my mistakes with that.
But just to let you know – I never asked you or other developers to do something and didn't complain you somehow. I just wanted to figure out why don't you follow PEP8.
Yes, this is not a big issue, this is not a good time to think about styling, but as I can see, it's easier for developers to follow some written style guide. Just IMO.

@bear
Copy link
Owner

bear commented Jul 4, 2013

I came across more grumpy than I wanted - sorry about that.

I was trying to say that "yes we can talk about it, but not in the context
of a pull request"

Actually it is a big issue if, and let me know if I get this wrong, that
you are saying this: I would contribute more and faster if you followed
PEP8

So yes, please do start another thread and let's close this one with a
"hmm, communication between folks is hard" thought and we can both start
over :)

thanks!

On Thu, Jul 4, 2013 at 2:19 AM, Daniil notifications@github.com wrote:

I'm kinda new here and don't have experience of collaboration with other
developers at all. Sorry for my mistakes with that.
But just to let you know – I never asked you or other developers to do
something and didn't complain you somehow. I just wanted to figure out why
don't you follow PEP8.
Yes, this is not a big issue, this is not a good time to think about
styling, but as I can see, it's easier for developers to follow some
written style guide. Just IMO.


Reply to this email directly or view it on GitHubhttps://github.com//issues/78#issuecomment-20460789
.

Bear

bear@xmpp.org (email)
bear42@gmail.com (xmpp, email)
bear@code-bear.com (xmpp, email)
http://code-bear.com/bearlog (weblog)

PGP Fingerprint = 9996 719F 973D B11B E111 D770 9331 E822 40B3 CD29

@daniilr daniilr closed this as completed Jul 4, 2013
@bear bear reopened this Jul 4, 2013
@bear
Copy link
Owner

bear commented Jul 4, 2013

What I would like to suggest is that you create a pep8 branch in your fork and then make the changes so we can test how it works and if it breaks anything.

I was thinking about this just now and your idea is great and it may even help the Python 3 branch - so please do consider doing this.

@bear
Copy link
Owner

bear commented Jul 4, 2013

For some reason I thought I was responding to you in the mailing list - that's why I said "close the thread". Only just now realized it was an Issue we were talking in :)

@daniilr
Copy link
Contributor Author

daniilr commented Jul 4, 2013

Ok. I thought I should open pull request in order to continue discussion on this topic :)

What I would like to suggest is that you create a pep8 branch in your fork and then make the changes so we can test how it works and if it breaks anything.

Yep! I created one in my fork. Working on it.

@bear
Copy link
Owner

bear commented Jul 4, 2013

that would work also - cool

(I just got worried that my being in a grumpy cranky-old-man mood might
have driven you off to be honest)

On Thu, Jul 4, 2013 at 3:03 AM, Daniil notifications@github.com wrote:

Ok. I thought I should open pull request in order to continue discussion
on this topic :)

What I would like to suggest is that you create a pep8 branch in your fork
and then make the changes so we can test how it works and if it breaks
anything.
Yep! I created one in my fork. Working on it.


Reply to this email directly or view it on GitHubhttps://github.com//issues/78#issuecomment-20462016
.

Bear

bear@xmpp.org (email)
bear42@gmail.com (xmpp, email)
bear@code-bear.com (xmpp, email)
http://code-bear.com/bearlog (weblog)

PGP Fingerprint = 9996 719F 973D B11B E111 D770 9331 E822 40B3 CD29

@sebastianw
Copy link
Collaborator

Okay, I see you've got it sorted out already. ;) For what it's worth: I find that PEP8 in general is a good idea and most IDEs (and even vim) can enable a PEP8 style-checker. So it would help the code to stay uniform and clean.

The question is, how to integrate this without too much work. We still have a lot of clean-up to do that potentially could remove thousands of lines of code and to rewrite this code according to PEP8 beforehand seems like a waste of time...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants