python optimizations

Create issue
Issue #17 new
dividee created an issue

About commit 848239d, it's not the isinstance call per se that was slow, but the use of the Number ABC.

I suggest getting rid of the Number ABC and replacing it by:

Number = int if _version3 else (int, long)

and use isinstance on that in color, bk_color, put and put_ext.

See here

(Sorry I don't have mercurial installed to submit pull requests).

edit: long support in python 2 is important at least for color and bk_color

Comments (2)

  1. Log in to comment