Skip to content

Python 3 Changes

Humberto A Sanchez II edited this page May 4, 2019 · 1 revision
  • Exception statements upgraded to use “as” syntax
  • print is now a function call
  • Use != instead of <>
  • One instance of intern() changed to import sys & sys.intern
  • Any code determining whether a string was str or unicodes simplified to know it is always unicode
  • Fix references of Python 3 renamed dict.iteritems -> dict.items
  • Fix reference to basestring to str (update to python 3)
  • Fix xrange to range (Python 3 update)
  • In some cases ‘isinstance’ was not working for Button objects. Added additional test for ‘iterable’
  • The method .add in vectors returns a map; Seems like in Python 3 this is not auto-converted to a tuple/list
  • Some updates to Shell and the root widget to accept the attribute keyword pairs in order to influence background color, foreground color, etc
  • Remove “object” classing; depend on 3.x implicit
  • Remove future references
Clone this wiki locally