From: Harald O. <har...@el...> - 2024-07-01 15:40:44
|
Am 01.07.2024 um 17:13 schrieb Marc Culler: > The Tcl_GetNumberFromObj() function knows about > doubles, integers and bignums, so you can determine > the type with only a single function call. If the string > is already parsed, Tcl_GetNumberFromObj() won't > do it again. > > > Unfortunately, that particular efficiency is not so useful, since the > conversion from Tcl_Obj to Python object only happens once anyway. It > seems possible that the authors of tkinter felt that comparing pointers > and having a generic fallback if the typePtr is NULL would be much > faster then calling Tcl_GetXXXXFromObj for all possible object types. > Also, the current tkinter code would work fine with no changes if all of > the core object types were registered. Marc, thank you for the great discussion. I hope, we will get some answers. May I comment the efficiency? This efficiency is also valid, if there is only one call. But that is not your problem. You may also add to the ticket cited by Sergey if you think, it is appropriate. Take care and thank you for all, Harald |