Python Forum
i am moving on to just python3
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
i am moving on to just python3
#1
the reason i have decided to go ahead and abandon Python2 before its EOL and move on to just Python3 is because Python2 does not support using * for arguments in a function def statement followed by named options spelled out explicitly. that is:
lt1/forums /home/forums 2> py2
Python 2.7.12 (default, Dec  4 2017, 14:50:18) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> def myfunction(*myargs,myopt1=None):
  File "<stdin>", line 1
    def myfunction(*myargs,myopt1=None):
                                ^
SyntaxError: invalid syntax
>>> 
lt1/forums /home/forums 3> py3
Python 3.5.2 (default, Nov 23 2017, 16:37:01) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> def myfunction(*myargs,myopt1=None):
...     return
... 
>>> 
lt1/forums /home/forums 4>
that plus better handling (still not perfect) of bytes and Unicode.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Messages In This Thread
i am moving on to just python3 - by Skaperen - Sep-27-2018, 08:12 PM
RE: i am moving on to just python3 - by Larz60+ - Sep-27-2018, 09:21 PM
RE: i am moving on to just python3 - by Skaperen - Sep-28-2018, 12:01 AM
RE: i am moving on to just python3 - by Larz60+ - Sep-28-2018, 10:29 AM

Forum Jump:

User Panel Messages

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