[issue887237] Machine integers

2013-10-13 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- versions: +Python 3.4 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue887237 ___ ___

[issue887237] Machine integers

2012-12-05 Thread Bruno Dupuis
Changes by Bruno Dupuis bdup...@lisael.org: -- nosy: +bruno.dupuis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue887237 ___ ___ Python-bugs-list

[issue887237] Machine integers

2011-03-27 Thread Daniel Urban
Changes by Daniel Urban urban.dani...@gmail.com: -- nosy: +durban ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue887237 ___ ___ Python-bugs-list

[issue887237] Machine integers

2011-03-26 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: You could write a Python script to generator the methods. -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue887237

[issue887237] Machine integers

2010-12-01 Thread Alexander Belopolsky
Alexander Belopolsky belopol...@users.sourceforge.net 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

[issue887237] Machine integers

2010-07-14 Thread Mark Lawrence
Mark Lawrence breamore...@yahoo.co.uk 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

[issue887237] Machine integers

2010-06-08 Thread Alexander Belopolsky
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: -- 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 Thomas Heller
Thomas Heller thel...@ctypes.org 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

[issue887237] Machine integers

2010-03-05 Thread Alexander Belopolsky
Alexander Belopolsky alexander.belopol...@gmail.com 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

[issue887237] Machine integers

2010-03-04 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Le Fri, 05 Mar 2010 02:21:30 +, Alexander Belopolsky rep...@bugs.python.org 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

[issue887237] Machine integers

2010-03-04 Thread Alexander Belopolsky
Alexander Belopolsky alexander.belopol...@gmail.com 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

[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] http://bugs.python.org/issue887237 ___

[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_type classes. See attached. Cool! Why didn't I think of that myself?

[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

[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