Message178815
A long time Tcl got support first 64-bit integers, and then arbitrary size integers. Python also supports arbitrary size integers. However Tkinter supports only C long integers. For example, on 32-bit platform:
>>> import tkinter
>>> t = tkinter.Tk()
>>> t.tk.call('expr', 2**30)
1073741824
>>> t.tk.call('expr', 2**31)
<wideInt object at 0x9122518>
>>> t.tk.call('expr', 2**63)
<bignum object at 0x9126010>
Those <wideInt object> and <bignum object> are not usable from Python. Potentially this can cause errors in some rare circumstances.
I'm working on a patch, but was faced with a problem. Tcl provides functions for conversions between Bignum Tcl object and mp_int, but it does not provide all functions for conversions between mp_int and bytes sequence. Which is better, add libtommath library to CPython dependencies, or implement the missing functionality manually? Or may be use haxadecimal representation for conversions? |
|
Date |
User |
Action |
Args |
2013-01-02 15:09:13 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, gpolo |
2013-01-02 15:09:13 | serhiy.storchaka | set | messageid: <1357139353.64.0.50025486638.issue16840@psf.upfronthosting.co.za> |
2013-01-02 15:09:13 | serhiy.storchaka | link | issue16840 messages |
2013-01-02 15:09:13 | serhiy.storchaka | create | |
|