Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
in python 2 and python 3
#6
As mention six is more elegant than import sys  try: except stuff.
A lot is under six.moves.
Also use future then can take quite a lot.
from __future__ import absolute_import, division, print_function, unicode_literals
from six.moves import input
from six.moves.urllib.request import urlopen
from six.moves import range
I think is best to not write code for Python 2.x anymore.
To move faster forward,Python 3.6 aslo has a lot features that can not be back ported.
Django 2.0 will drop Python 2.7 and 3.4,i think this is the right move.
Quote:Django 2.0 supports Python 3.5+. Since Django 1.11, support for Python 2.7 and 3.4 is removed.
Reply


Messages In This Thread
in python 2 and python 3 - by Skaperen - Feb-12-2017, 04:19 AM
RE: in python 2 and python 3 - by stranac - Feb-12-2017, 06:12 AM
RE: in python 2 and python 3 - by wavic - Feb-12-2017, 07:08 AM
RE: in python 2 and python 3 - by metulburr - Feb-12-2017, 09:08 PM
RE: in python 2 and python 3 - by ichabod801 - Feb-12-2017, 11:55 PM
RE: in python 2 and python 3 - by snippsat - Feb-13-2017, 01:48 AM
RE: in python 2 and python 3 - by Skaperen - Feb-13-2017, 02:45 AM
RE: in python 2 and python 3 - by metulburr - Feb-13-2017, 04:21 AM
RE: in python 2 and python 3 - by Skaperen - Feb-17-2017, 05:10 AM
RE: in python 2 and python 3 - by wavic - Feb-13-2017, 07:56 AM
RE: in python 2 and python 3 - by ichabod801 - Feb-13-2017, 11:37 AM
RE: in python 2 and python 3 - by snippsat - Feb-13-2017, 01:47 PM
RE: in python 2 and python 3 - by ichabod801 - Feb-18-2017, 01:57 AM
RE: in python 2 and python 3 - by Skaperen - Feb-18-2017, 05:16 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020