On Fri, Mar 20, 2015 at 9:24 PM, Ian Lee wrote:
> Guido,
>
> In that case would you be open to a patch to update the PEP accordingly?
>
Only if it totally eradicate __version__ and similar from the PEP.
> Additionally, does that official statement cover other dunder assignments
> (e.g. "__autho
On 22 March 2015 at 07:46, Barry Warsaw wrote:
> On Mar 21, 2015, at 05:00 PM, Donald Stufft wrote:
>
>>I sort of think (though I haven’t completely convinced myself) that adding
>>something like __version__ to a package is a work around to the fact that
>>we don’t have an API that lets someone as
On Mar 21, 2015, at 05:00 PM, Donald Stufft wrote:
>I sort of think (though I haven’t completely convinced myself) that adding
>something like __version__ to a package is a work around to the fact that
>we don’t have an API that lets someone ask “what is the distribution and
>version that this mod
> On Mar 21, 2015, at 5:17 PM, MRAB wrote:
>
> On 2015-03-21 21:00, Donald Stufft wrote:
>>
>>> On Mar 21, 2015, at 4:53 PM, Barry Warsaw wrote:
>>>
>>> On Mar 20, 2015, at 08:53 PM, Guido van Rossum wrote:
>>>
FWIW, I think __version__, __author__ etc. were bad ideas. Almost nobody
>>>
On 2015-03-21 21:00, Donald Stufft wrote:
On Mar 21, 2015, at 4:53 PM, Barry Warsaw wrote:
On Mar 20, 2015, at 08:53 PM, Guido van Rossum wrote:
FWIW, I think __version__, __author__ etc. were bad ideas. Almost nobody
manages these correctly. Note that the PEP 8 section starts with less tha
> On Mar 21, 2015, at 4:53 PM, Barry Warsaw wrote:
>
> On Mar 20, 2015, at 08:53 PM, Guido van Rossum wrote:
>
>> 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 *ha
On Mar 20, 2015, at 09:59 PM, Ian Lee wrote:
>shebang
>docstring
>imports
>dunder assignments
>other code...
I generally put imports after dunders, except for __future__. I want the
first screenful of code to contain them, and imports can be a few dozen lines
in some modules.
-Barry
___
On Mar 20, 2015, at 08:53 PM, Guido van Rossum wrote:
>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
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
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
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
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
13 matches
Mail list logo