> On Oct 8, 2014, at 3:36 PM, Wes Turner <wes.turner at gmail.com> wrote: > > > On Oct 8, 2014 7:20 AM, "Donald Stufft" <donald at stufft.io <mailto:donald at stufft.io>> wrote: > > > > > > > On Oct 8, 2014, at 6:16 AM, Christian Tismer <tismer at stackless.com <mailto:tismer at stackless.com>> wrote: > > > > > > > > > -----BEGIN PGP SIGNED MESSAGE----- > > > Hash: SHA512 > > > > > > Howdy, > > > > > > this question is a bit about general policy which is not yet > > > covered in the python recommendations: > > > > > > I see projects which do check-ins like "get rid of shebang lines" > > > and they remove those lines from non-script sources. > > > > > > It is not always clear to me what to do, so I tend to leave those > > > lines in per default, in order not to waste time thinking about it, > > > but well, today I was confronted with that. > > > > > > Digging a bit deeper shows the following: > > > > > > python docs: > > > No mention of shebang, but for Windows. > > > https://docs.python.org/3/search.html?q=shebang&check_keywords=yes&area=default <https://docs.python.org/3/search.html?q=shebang&check_keywords=yes&area=default> > > > https://docs.python.org/3/using/windows.html?highlight=shebang <https://docs.python.org/3/using/windows.html?highlight=shebang> > > > > > > Google's python style guide also says when a shebang is needed, but > > > does not forbid it. > > > > > > Pep 394 explains how to use shebang, but still nothing about not using it. > > > http://legacy.python.org/dev/peps/pep-0394/ <http://legacy.python.org/dev/peps/pep-0394/> > > > > > > So is there anything officially preferred, and should that go into pep 8? > > > > Some editors can use shebang lines to control syntax highlighting or linting > > (mine for example will lint different for python2 vs python3 shebangs). > > Does it support shebang lines like: > > #!/usr/bin/env python > > ? > Sure. Though it doesn’t resolve it to determine what that would actually execute, it just uses the name of the python in the shebang as heuristics. --- Donald Stufft PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20141008/acd67269/attachment.html>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4