[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Design: method in class or general function?

On Thu, Sep 7, 2017 at 11:31 PM, Ben Finney <ben+python at benfinney.id.au> wrote:
> leam hall <leamhall at gmail.com> writes:
>> I've wrestled with that discussion for a while and Python 3 loses every
>> time.
> The context of the thread you started was that you are a *newcomer* to
> Python. Now you say you've considered Python 2 versus Python 3 many
> times? What explains that apparent contradiction?

The original comment was "OOP newbie". My reading is that s/he has
used Py2 for years but never actually created a class - which is a
perfectly reasonable thing in Python, unlike some languages.

That said, though: even if you're not going to move to Python 3, I
*strongly* recommend moving to 2.7. Python 2.6 is ancient and not in
support; Python 2.7 is still old, but is in support (for a few more
years with python.org, and then possibly after that if you have
pay-for support eg with Red Hat). There should be very few reasons for
sticking with 2.6.

Those millions of servers running Python 2? You'd be surprised how
many of them are now actually running Python 3 - but the rest of them
NEED to be on 2.7 if they want bug fixes and security patches. Don't
wait for a major problem.