FWIW, I would vote for the "__version__", "__author__", etc assignments
being after the imports. Reason being cases where the "__version__" is not
from VCS, but is calculated from pkg_resources:
from pkg_resources import get_distribution
__version__ = get_distribution('mypackage').version
Also, t
How to document functions with optional positional parameters?
For example binascii.crc32(). It has two positional parameters, one is
mandatory, and one is optional with default value 0. With Argument
Clinic its signature is crc32(data, crc=0, /). In the documentation it
is written as crc32(da
On Fri, Mar 20, 2015 at 10:57 PM, Guido van Rossum wrote:
> Neil, you have no idea. Please back off.
I wouldn't go that far. Wanting a quality code base certainly isn't a
bad thing, but there's a lot more progress to be made by working with
what's there and being as mindful as possible of the gui
Guido,
In that case would you be open to a patch to update the PEP accordingly?
Additionally, does that official statement cover other dunder assignments
(e.g. "__author__"?). If so I'll update the PEP8 tool accordingly.
Thanks,
~ Ian Lee
On Mar 20, 2015 8:55 PM, "Guido van Rossum" wrote:
> F
Neil, you have no idea. Please back off.
On Fri, Mar 20, 2015 at 8:02 PM, Neil Girdhar wrote:
> The code reviews I got asked me to revert PEP 7 changes. I can understand
> that, but then logically someone should go ahead and clean up the code.
> It's not "high risk" if you just check for whites
FWIW, I think __version__, __author__ etc. were bad ideas. Almost nobody
manages these correctly. Note that the PEP 8 section starts with less than
an endorsement: "If you *have* to have Subversion, CVS, or RCS crud in your
source file, do it as follows."
That said, if an official answer is requir
On Fri, Mar 20, 2015 at 10:02 PM, Neil Girdhar wrote:
> The code reviews I got asked me to revert PEP 7 changes. I can understand
> that, but then logically someone should go ahead and clean up the code.
> It's not "high risk" if you just check for whitespace equivalence of the
> source code and
The code reviews I got asked me to revert PEP 7 changes. I can understand
that, but then logically someone should go ahead and clean up the code.
It's not "high risk" if you just check for whitespace equivalence of the
source code and binary equivalence of the compiled code. The value is for
peop
On Fri, Mar 20, 2015 at 7:54 PM, Neil Girdhar wrote:
> If ever someone wants to clean up the repository to conform to PEP 7, I
> wrote a program that catches a couple hundred PEP 7 violations in ./Python
> alone (1400 in the whole codebase):
>
> import os
> import re
>
> def grep(path, regex):
>
Lewis Coates writes:
> In pep8 there are two conflicting statements, both
>
> https://www.python.org/dev/peps/pep-0008/#version-bookkeeping
> https://www.python.org/dev/peps/pep-0008/#imports
>
> Stipulate that they should be "at the top of the file after any module
> comments and docstrings." Wh
In pep8 there are two conflicting statements, both
https://www.python.org/dev/peps/pep-0008/#version-bookkeeping
https://www.python.org/dev/peps/pep-0008/#imports
Stipulate that they should be "at the top of the file after any module
comments and docstrings." Which of these takes precedence?
Sec
If ever someone wants to clean up the repository to conform to PEP 7, I
wrote a program that catches a couple hundred PEP 7 violations in ./Python
alone (1400 in the whole codebase):
import os
import re
def grep(path, regex):
reg_obj = re.compile(regex, re.M)
res = []
for root, dirs,
-- Forwarded message --
From: 罗勇刚(Yonggang Luo)
Date: 2015-03-21 2:24 GMT+08:00
Subject: class os.DirEntry is confusing,
To: Python
Should be replaced with os.FsEntry or os.ScanEntry
--
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo
--
此致
礼
罗勇刚
Yours
sincer
Awesome, that's what I was hoping. Accepted! Congrats and thank you very
much for writing the PEP and guiding the discussion.
On Fri, Mar 20, 2015 at 4:00 PM, Brett Cannon wrote:
>
>
> On Fri, Mar 20, 2015 at 4:41 PM Guido van Rossum wrote:
>
>> I am willing to be the BDFL for this PEP. I have
Wow, this is an excellent review. Thank you.
My only question is with respect to this:
I think there ought to be two opcodes; one for unpacking maps in
function calls and another for literals. The whole function location
thing is rather hideous.
What are the two opcodes? BUILD_MAP_UNPACK and B
On Fri, Mar 20, 2015 at 4:41 PM Guido van Rossum wrote:
> I am willing to be the BDFL for this PEP. I have tried to skim the recent
> discussion (only python-dev) and I don't see much remaining controversy.
> HOWEVER... The PEP is not clear (or at least too subtle) about the actual
> name for opt
On 3/20/2015 9:31 AM, anatoly techtonik wrote:
Just a pointer for possible regression http://bugs.python.org/issue23058
I just added the argparse maintainer to the nosy list
--
Terry Jan Reedy
___
Python-Dev mailing list
Python-Dev@python.org
https:
I am willing to be the BDFL for this PEP. I have tried to skim the recent
discussion (only python-dev) and I don't see much remaining controversy.
HOWEVER... The PEP is not clear (or at least too subtle) about the actual
name for optimization level 0. If I have foo.py, and I compile it three
times
I have decided to have the default case of no optimization levels mean that
the .pyc file name will have *no* optimization level specified in the name
and thus be just as it is today. I made this decision due to potential
backwards-compatibility issues -- although I expect them to be minutes --
and
ACTIVITY SUMMARY (2015-03-13 - 2015-03-20)
Python tracker at http://bugs.python.org/
To view or respond to any of the issues listed below, click on the issue.
Do NOT respond to this message.
Issues counts and deltas:
open4798 (-19)
closed 30685 (+81)
total 35483 (+62)
Open issues wit
Hi list,
while a class is being initialized in a metaclass, it is not always possible to
call classmethods of the class, as they might use super(), which in turn uses
__class__, which is not initialized yet.
I know that this is a known issue, but well, sometimes it even makes sense
to fix already
Just a pointer for possible regression http://bugs.python.org/issue23058
--
anatoly t.
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
https://mail.python.org/mailman/options/python-dev
22 matches
Mail list logo