cfbolz changed the topic of #pypy to: #pypy PyPy, the flexible snake https://pypy.org | IRC logs: https://quodlibet.duckdns.org/irc/pypy/latest.log.html#irc-end and https://libera.irclog.whitequark.org/pypy | the pypy angle is to shrug and copy the implementation of CPython as closely as possible, and staying out of design decisions
jcea has quit [Ping timeout: 268 seconds]
derpydoo has joined #pypy
gsekulski has joined #pypy
<gsekulski> Hey, I couldn’t find information about a specific style guide enforced in PyPy, so I assume the accepted conventions are those described in PEP.
<gsekulski> Browsing PyPy there seems to be some inconsistencies in comment formatting across the codebase, such as:
<gsekulski> 1. Two types of single-line comments serving the same purpose appearing just a few lines apart - https://github.com/pypy/pypy/blob/c2324b8ac30693d049214bf6a0447d52ebbfc352/pypy/interpreter/pyframe.py#L641 (lines 641, 676 and 706)
<gsekulski> 2. Mixed styles of multi-line comments within the same file - incorrect (according to PEP257 https://peps.python.org/pep-0257/): https://github.com/pypy/pypy/blob/c2324b8ac30693d049214bf6a0447d52ebbfc352/pypy/interpreter/pyframe.py#L572 vs. correct:
<gsekulski> Such mixups are present in a few more files, while others, like pycompiler.py, are well-formatted and follow PEP commenting style - https://github.com/pypy/pypy/blob/c2324b8ac30693d049214bf6a0447d52ebbfc352/pypy/interpreter/pycompiler.py
<gsekulski> Would there be interest in standardizing this? I’d be happy to propose a pull request. Since I haven't contributed to PyPy before, I wanted to check in first, following the contributor guidelines.
<gsekulski> Actually three, not two.
<nimaje> regarding 2. python doesn't have any multiline comments and regarding 1. it seems to me like you mistake docstrings for comments there
<gsekulski> Multiline docstrings, sorry. In 641 it's indeed a comment, docstrings are in 676 and 706
<nimaje> and both examples for 2. are incorrect according to pep257, as they don't contain a summary line, but what problem do you see there?
<nimaje> ah, "Unless the entire docstring fits on a line, place the closing quotes on a line by themselves."
<gsekulski> When browsing the source code, I found it odd that several similar functions are described in different ways. It's not that I have a problem with it, though I think it would be better if they all (correctly) follow PEP
derpydoo has quit [Ping timeout: 268 seconds]
jcea has joined #pypy
gsekulski has quit [Quit: Client closed]
<cfbolz> gsekulski: fixing style for style sake is very unlikely to be accepted. we have too many active branches for this to lead to anything but confusion and merge conflicts
<cfbolz> it's better to improve code that you are touching for functionality/bug reasons
nightstrike has joined #pypy
Dejan has joined #pypy
Dejan has quit [Quit: Leaving]