[issue887237] Machine integers

2013-10-13 Thread Ezio Melotti
Changes by Ezio Melotti : -- versions: +Python 3.4 -Python 3.2 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue887237] Machine integers

2012-12-05 Thread Bruno Dupuis
Changes by Bruno Dupuis : -- nosy: +bruno.dupuis ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue887237] Machine integers

2011-03-27 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +durban ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue887237] Machine integers

2011-03-26 Thread Benjamin Peterson
Benjamin Peterson added the comment: You could write a Python script to generator the methods. -- nosy: +benjamin.peterson ___ Python tracker ___ __

[issue887237] Machine integers

2010-12-01 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: As far as I understand, the main concern about issue887237.diff was code duplication. There are two ways to fight it: C preprocessor tricks as in issue887237-macro.diff and code generation as done in numpy. With improved macro support in many compiler

[issue887237] Machine integers

2010-07-14 Thread Mark Lawrence
Mark Lawrence added the comment: Perhaps people could review the latest patch in view of the following. 1) Quote from Mark Dickinson msg75815 "I think this would be valuable for rapid prototyping of an algorithm in Python before translating it into C. In particular, it might help with detecti

[issue887237] Machine integers

2010-06-08 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- assignee: -> belopolsky components: +Extension Modules, ctypes -Library (Lib) nosy: -Alexander.Belopolsky stage: -> patch review versions: +Python 3.2 ___ Python tracker ___

[issue887237] Machine integers

2010-03-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Attaching a patch that is equivalent toissue887237.diff, but uses preprocessor to generate repetitive code. -- Added file: http://bugs.python.org/file16466/issue887237-macro.diff ___ Python tracker

[issue887237] Machine integers

2010-03-05 Thread Thomas Heller
Thomas Heller added the comment: >> Code duplication is unavoidable because the goal is to give access to >> machine arithmetics which means (# types) x (# operations) of very >> similar looking functions. I considered reducing (perceived) code >> duplication through some pre-processor magic, bu

[issue887237] Machine integers

2010-03-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I would like to hear from Thomas before introducing macros in this code. I tried to follow the style of cfield.c which shows similar code duplication. There are also some questions that need to be answered before polishing the code. 1. Should mixed arit

[issue887237] Machine integers

2010-03-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le Fri, 05 Mar 2010 02:21:30 +, Alexander Belopolsky a écrit : > > Code duplication is unavoidable because the goal is to give access to > machine arithmetics which means (# types) x (# operations) of very > similar looking functions. I considered reducing

[issue887237] Machine integers

2008-12-10 Thread Thomas Heller
Thomas Heller <[EMAIL PROTECTED]> added the comment: >> One difficulty with the patch is that the original ctypes code >> contained a tp_as_number ... >This can be solved by changing the order of bases for c_ classes. >See attached. Cool! Why didn't I think of that myself? __

[issue887237] Machine integers

2008-12-10 Thread Alexander Belopolsky
Changes by Alexander Belopolsky <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file12323/ctypes-numbermixins-1.patch ___ Python tracker <[EMAIL PROTECTED]> ___ _

[issue887237] Machine integers

2008-12-10 Thread Alexander Belopolsky
Alexander Belopolsky <[EMAIL PROTECTED]> added the comment: > I wonder if a patch for ctypes like this (which is not yet complete) > could be used to implement this, or MUST it be implemented in C? For the intended purpose of giving access to raw machine arithmetics, I would think a C implement

[issue887237] Machine integers

2008-11-15 Thread Thomas Heller
Thomas Heller <[EMAIL PROTECTED]> added the comment: I wonder if a patch for ctypes like this (which is not yet complete) could be used to implement this, or MUST it be implemented in C? The patch contains a mixin class that implements the numeric methods. However, the actual operation takes pl

[issue887237] Machine integers

2008-11-13 Thread Mark Dickinson
Mark Dickinson <[EMAIL PROTECTED]> added the comment: Is it be feasible to add arithmetic operations to the ctypes integer types? Since ctypes is now in the core, it would seem better to enhance ctypes than provide a new module. I think this would be valuable for rapid prototyping of an algorit