#8 Patches to make code more Ptyhon 3.x compliant

Unstable
open
nobody
None
5
2013-12-10
2013-09-02
No

I've attached 3 patches to make the code more compliant with Python 3:

1.patch updates the not equals operator from "<>" to "!="

2.patch replaces backquotes with repr()

3.patch replaces has_key() method calls with in. I have left the has_key method in any FontTools class that define it for backwards compatibility, and added a contains method as an alias.

Andrew

3 Attachments

Discussion

  • Andrew Miller

    Andrew Miller - 2013-09-02

    3a.patch fixes a syntax error caused by 3.patch.

    4.patch updates the print statement to Python 3 syntax. All files that use print have also had "from future import print_function" added to them.

     
    Last edit: Andrew Miller 2013-09-03
  • Andrew Miller

    Andrew Miller - 2013-09-04

    5.patch updates the syntax of the raise statements

    6.patch removes tuple parameter unpacking from functions

     
  • Andrew Miller

    Andrew Miller - 2013-09-05

    7.patch replaces the new module with the types module

     
  • Andrew Miller

    Andrew Miller - 2013-09-11

    8.patch splits local and absolute imports to separate lines.

    9.patch replaces map(operator.setitem ...) commands with dict(zip(...)) commands

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks