Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][tlug] Python 2x3 [was: Um, so... systemd?]
- Date: Tue, 17 Jan 2017 16:59:59 +0900
- From: "Stephen J. Turnbull" <turnbull.stephen.fw@example.com>
- Subject: [tlug] Python 2x3 [was: Um, so... systemd?]
- References: <1484466028.1128194.848109712.20A4C328@webmail.messagingengine.com> <d4bcb8a1-a9a1-781f-3c36-fbc3ba4ee2a0@dcook.org> <20170116130517.GA27524@monotonic.cynic.net> <d27a95fa-bbaf-aa0f-3b8b-2e3e871592db@dcook.org>
Darren Cook writes: > Meanwhile I've spent a lot more time the past couple of months > trying to work out if I'm writing code that will work in both > Python 2.7 and 3.x :-) I really can't recommend doing that any more. There remain good reasons for sticking to 2.7 for consultants working with existing codebases, but most new code (and I mean >50% but increasing steadily) is now being written in Python 3, and most libraries have Python 3-compatible versions. Many applications require Python >= 3.4. There are already even people out there saying "I'm not interested in working in anything less than Python 3.6,"[1] which is like two weeks old. You're really screwing yourself and likely more than half your clients restricting yourself to 2.7-compatible code. Bottom line: If you're going to write code for 2.7, just write it for 2.7, hold the line at bug fixes and security features (2.7 itself doesn't even get bug fixes any more), and write a separate version for 3.x going forward. Of course you know your business, and you may have no clients on 3.x for x > 3 where the pain of abstaining from 3-only features starts to be noticable (1 broken ribby, 2 broken ribby), but be aware that the pain is likely to be unbearable (7 broken ribby, several in more than one place) in a year and a half when 3.7 comes out and many people are actually using 3.6 in production. Footnotes: [1] This is still a little unusual, stemming from a combination of the generic goodness of f-strings, which allow you to write string expressions that take their value from the context namespace rather than as method invocation arguments, and the rather esoteric new async stuff, which makes it much easier to write robust event-driven or coroutine-based servers (or evil code that nobody knows how it works).
- Follow-Ups:
- Re: [tlug] Python 2x3 [was: Um, so... systemd?]
- From: Christian Horn
- References:
- [tlug] Um, so... systemd?
- From: David J Iannucci
- Re: [tlug] Um, so... systemd?
- From: Darren Cook
- Re: [tlug] Um, so... systemd?
- From: Curt Sampson
- Re: [tlug] Um, so... systemd?
- From: Darren Cook
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Um, so... systemd?
- Next by Date: Re: [tlug] Um, so... systemd?
- Previous by thread: Re: [tlug] Um, so... systemd?
- Next by thread: Re: [tlug] Python 2x3 [was: Um, so... systemd?]
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links