git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC/PATCH] CodingGuidelines: add Python code guidelines

From
John Keeping <john@keeping.me.uk>
Date
Jan 18, 2013, 23:05 UTC
Message-ID
<20130118230557.GG31172@serenity.lan>
In-Reply-To
<7vwqvap1q9.fsf@alter.siamese.dyndns.org>
On Fri, Jan 18, 2013 at 02:26:06PM -0800, Junio C Hamano wrote:
Show 16 quoted lines
> John Keeping <john@keeping.me.uk> writes:
>> On Fri, Jan 18, 2013 at 12:25:34PM -0800, Junio C Hamano wrote:
>>> These early versions may not be unstable in the "this does not
>>> behave as specified in the language specification for 3.x" sense,
>>> but for the purpose of running scripts meant to be executable by
>>> both 2.x and 3.x series, the early 3.x versions are not as good as
>>> later versions where Python folks started making deliberate effort
>>> to support them.
>>
>> As far as I'm aware (and having reviewed the release notes for 3.1, 3.2
>> and 3.3 as well as the planned features for 3.4), Unicode literals are
>> the only feature to have been added that was intended to make it easier
>> to support Python 2 and 3 in the same codebase.
> 
> So there may be some other incompatibility lurking that we may run
> into later?

I doubt it - enough projects are running on Python 2 and 3 now that I doubt there's anything unexpected left to hit.

Show 6 quoted lines
>> Given that no code currently on pu uses Unicode literals, I don't see a
>> reason to specify a minimum version of Python 3 since we're already
>> restricting ourselves to features in 2.6.
> 
> OK, at least that reasoning need to be kept somewhere, either in the
> documentation of in the log message.
I'll put it in the log message when I send this as a proper patch.
John
Previous: Junio C Hamano
Message 7 of 7 in “CodingGuidelines: add Python code guidelines”
  1. CodingGuidelines: add Python code guidelinesJohn Keeping, Jan 18, 2013
  2. Junio C HamanoJan 18, 2013
  3. John KeepingJan 18, 2013
  4. Junio C HamanoJan 18, 2013
  5. John KeepingJan 18, 2013
  6. Junio C HamanoJan 18, 2013
  7. John KeepingJan 18, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.