[issue3132] implement PEP 3118 struct changes

2011-09-04 Thread Meador Inge
Meador Inge added the comment: Is this work something that might be suitable for the features/pep-3118 repo (http://hg.python.org/features/pep-3118/) ? -- ___ Python tracker <http://bugs.python.org/issue3

[issue12881] ctypes: segfault with large structure field names

2011-09-03 Thread Meador Inge
Meador Inge added the comment: Here is a patch that replaces the 'alloca' call with 'PyMem_Malloc'. -- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file23094/issue12881.patch __

[issue5149] syntactic sugar: type coercion on pointer assignment

2011-09-02 Thread Meador Inge
Meador Inge added the comment: This is busted for plain old assignment too: Python 3.3.0a0 (default:6374b4ffe00c, Sep 2 2011, 23:50:39) [GCC 4.6.0 20110603 (Red Hat 4.6.0-10)] on linux Type "help", "copyright", "credits" or "license" for more inform

[issue12764] segfault in ctypes.Struct with bad _fields_

2011-09-02 Thread Meador Inge
Meador Inge added the comment: This has been fixed. I verified tip and 2.7. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue12881] ctypes: segfault with large structure field names

2011-09-02 Thread Meador Inge
Meador Inge added the comment: On Fri, Sep 2, 2011 at 4:26 PM, Amaury Forgeot d'Arc wrote: > > Amaury Forgeot d'Arc added the comment: > > Certainly the effect of some "alloca" call with a large value, then the stack > overflows. Yeah, I noticed that too.

[issue12881] ctypes: segfault with large structure field names

2011-09-01 Thread Meador Inge
New submission from Meador Inge : Reproduced on Fedora 15 with tip Python: [meadori@motherbrain cpython]$ ./python Python 3.3.0a0 (default:3102951cc1ce+, Sep 1 2011, 22:19:06) [GCC 4.6.0 20110603 (Red Hat 4.6.0-10)] on linux Type "help", "copyright", "credi

[issue12764] segfault in ctypes.Struct with bad _fields_

2011-09-01 Thread Meador Inge
Meador Inge added the comment: Vlad, Thanks for the patch. A few nits: 1. The test case is in 'test_bitfields.py'. I think it should go in 'test_structures.py'. 2. The test case would probably be cleaner using a 'with' context manager:

[issue6006] ffi.c compile failures on AIX 5.3 with xlc

2011-09-01 Thread Meador Inge
Changes by Meador Inge : -- assignee: theller -> nosy: -theller priority: normal -> low stage: -> patch review type: -> compile error ___ Python tracker <http://bugs.pytho

[issue5718] Problem compiling ffi part of build on AIX 5.3.

2011-09-01 Thread Meador Inge
Changes by Meador Inge : -- assignee: theller -> nosy: -theller priority: normal -> low stage: -> needs patch ___ Python tracker <http://bugs.python.o

[issue6980] fix ctypes build failure on armel-linux-gnueabi with -mfloat-abi=softfp

2011-09-01 Thread Meador Inge
Meador Inge added the comment: Whoops. I meant to post a link to the commit before. It is here: http://hg.python.org/cpython/rev/584db03e5248. -- ___ Python tracker <http://bugs.python.org/issue6

[issue6980] fix ctypes build failure on armel-linux-gnueabi with -mfloat-abi=softfp

2011-09-01 Thread Meador Inge
Meador Inge added the comment: This was, in fact, committed already. -- assignee: theller -> nosy: +meadori -theller resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.pytho

[issue9175] ctypes doesn't build on hp-ux

2011-09-01 Thread Meador Inge
Changes by Meador Inge : -- assignee: theller -> nosy: -theller priority: normal -> low ___ Python tracker <http://bugs.python.org/issue9175> ___ ___ Pyth

[issue9030] ctypes variable limits

2011-09-01 Thread Meador Inge
Changes by Meador Inge : -- nosy: -theller stage: -> needs patch ___ Python tracker <http://bugs.python.org/issue9030> ___ ___ Python-bugs-list mai

[issue11920] ctypes: Strange bitfield structure sizing issue

2011-09-01 Thread Meador Inge
Meador Inge added the comment: Hi Steve, There is currently no way to deal with this situation. Vlad has opened issue12528 with a proposal to make the allocation strategy configurable from the 'ctypes' API. Please follow that issue if you are still interested. I am closing

[issue6069] casting error from ctypes array to structure

2011-09-01 Thread Meador Inge
Meador Inge added the comment: I opened issue12880 for the doc bug. Closing this one out ... -- resolution: -> invalid status: open -> closed ___ Python tracker <http://bugs.python.org/

[issue6069] casting error from ctypes array to structure

2011-09-01 Thread Meador Inge
Changes by Meador Inge : -- stage: test needed -> committed/rejected ___ Python tracker <http://bugs.python.org/issue6069> ___ ___ Python-bugs-list mai

[issue12880] ctypes: clearly document how structure bit fields are allocated

2011-09-01 Thread Meador Inge
New submission from Meador Inge : As issues like issue6069 and issue11920 allude to, figuring out how 'ctypes' allocates bit-fields is not very clear. The documentation should be enhanced to flesh this out in more detail. As an example, Microsoft documents the VC++ implement

[issue12528] Implement configurable bitfield allocation strategy

2011-09-01 Thread Meador Inge
Meador Inge added the comment: Hi Vlad, On Thu, Sep 1, 2011 at 1:30 PM, Vlad Riscutia wrote: > Vlad Riscutia added the comment: > > Well currently we pack bitfields with an algorithm that uses #ifdefs for GCC > and MSVC builds. This feature tries to remove the > hardcod

[issue12528] Implement configurable bitfield allocation strategy

2011-09-01 Thread Meador Inge
Meador Inge added the comment: As stated, how a particular compiler allocates bitfields is *extremely* implementation specific. There can be differences in implementations between different compilers, different *versions* of the same compiler, and different invocations of the same compiler

[issue6069] casting error from ctypes array to structure

2011-09-01 Thread Meador Inge
Meador Inge added the comment: On Thu, Sep 1, 2011 at 9:45 AM, Vlad Riscutia wrote: > Vlad Riscutia added the comment: > > Meador, I believe this was the first issue on the tracker that got me looking > into bitfield allocation. > I agree that big-endian on MSVC doesn't

[issue6069] casting error from ctypes array to structure

2011-08-31 Thread Meador Inge
Meador Inge added the comment: Hmmm ... Assuming a native VC++ compiler on an x86 machine running Windows, then it doesn't make sense to validate these test cases in such an environment. All the tests are all big-endian. 'ctypes' can't be expected to behave the same as

[issue11241] ctypes: subclassing an already subclassed ArrayType generates AttributeError

2011-08-30 Thread Meador Inge
Meador Inge added the comment: Thanks a lot for committing this for me Amaury. -- ___ Python tracker <http://bugs.python.org/issue11241> ___ ___ Python-bug

[issue9041] raised exception is misleading

2011-08-30 Thread Meador Inge
Meador Inge added the comment: That is a good question. While it is true that errors other than 'PyExc_OverflowError', will be mapped onto a 'TypeError' I don't think that is a bad thing. Any errors that come out of 'PyFloat_AsDouble' should be handl

[issue11241] ctypes: subclassing an already subclassed ArrayType generates AttributeError

2011-08-25 Thread Meador Inge
Meador Inge added the comment: This patch was marked as accepted, but it doesn't seem to be committed. Will someone commit it? -- ___ Python tracker <http://bugs.python.org/is

[issue7433] MemoryView memory_getbuf causes segfaults, double call to tp_releasebuffer

2011-08-18 Thread Meador Inge
Changes by Meador Inge : -- stage: -> needs patch ___ Python tracker <http://bugs.python.org/issue7433> ___ ___ Python-bugs-list mailing list Unsubscri

[issue2651] Strings passed to KeyError do not round trip

2011-08-18 Thread Meador Inge
Changes by Meador Inge : -- stage: needs patch -> patch review ___ Python tracker <http://bugs.python.org/issue2651> ___ ___ Python-bugs-list mailing list Un

[issue8743] set() operators don't work with collections.Set instances

2011-08-18 Thread Meador Inge
Changes by Meador Inge : -- resolution: accepted -> stage: needs patch -> patch review ___ Python tracker <http://bugs.python.org/issue8743> ___ ___ Pyth

[issue9651] ctypes crash when writing zerolength string buffer to file

2011-08-17 Thread Meador Inge
Meador Inge added the comment: Ping. I think this one is OK to commit. -- nosy: +belopolsky ___ Python tracker <http://bugs.python.org/issue9651> ___ ___ Pytho

[issue10320] printf %qd is nonstandard

2011-08-17 Thread Meador Inge
Meador Inge added the comment: I agree that this violates C99, but is this actually causing any real world problems with the platforms Python supports? If so, then we need a test case. This seems low priority -- assignee: theller -> nosy: +amaury.forgeotdarc, belopol

[issue12740] Add struct.Struct.nmemb

2011-08-16 Thread Meador Inge
Meador Inge added the comment: Stefan, it is a constructed failure (I hacked the unit test to break it). -- ___ Python tracker <http://bugs.python.org/issue12

[issue12740] Add struct.Struct.nmemb

2011-08-15 Thread Meador Inge
Meador Inge added the comment: On Sun, Aug 14, 2011 at 1:03 PM, Stefan Krah wrote: > > Stefan Krah added the comment: > > I like random tests in the stdlib, otherwise the same thing gets tested > over and over again. `make buildbottest` prints the seed, and you can do > it

[issue12740] Add struct.Struct.nmemb

2011-08-13 Thread Meador Inge
Meador Inge added the comment: The functionality part of the patch looks reasonable. However, the pseudo-randomization in the unit tests seems like a bad idea. Say someone is adding a new feature X. Runs the unit tests to find one of them failing. Then runs them again to investigate and

[issue11241] ctypes: subclassing an already subclassed ArrayType generates AttributeError

2011-08-12 Thread Meador Inge
Meador Inge added the comment: Amaury, how about this patch? I got rid of querying the type dictionary and hoisted the creation of the type instance earlier. Then 'PyObject_GetAttrString' can be used to lookup '_length_' and '_type_' by the regular Pyt

[issue12738] Bug in multiprocessing.JoinableQueue() implementation on Ubuntu 11.04

2011-08-12 Thread Meador Inge
Meador Inge added the comment: Michael, It is hard to tell from your description alone where the bug is. Could you provide more detailed reproduction steps with a test case that exhibits the issue? -- nosy: +jnoller, meador.inge stage: -> test nee

[issue12744] inefficient pickling of long integers on 64-bit builds

2011-08-12 Thread Meador Inge
Changes by Meador Inge : -- stage: -> needs patch ___ Python tracker <http://bugs.python.org/issue12744> ___ ___ Python-bugs-list mailing list Unsubscri

[issue12744] inefficient pickling of long integers on 64-bit builds

2011-08-12 Thread Meador Inge
Changes by Meador Inge : -- nosy: +meador.inge ___ Python tracker <http://bugs.python.org/issue12744> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11105] Compiling evil ast crashes interpreter

2011-08-11 Thread Meador Inge
Changes by Meador Inge : -- nosy: +meador.inge ___ Python tracker <http://bugs.python.org/issue11105> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12613] itertools fixer fails

2011-08-10 Thread Meador Inge
Meador Inge added the comment: I see two problems that cause the posted test cases to fail: 1. The 'next' fixer runs before the 'itertools' fixer and strips out a 'power' node. This keeps the 'itertools' fixer from matching. 2. The '

[issue12613] itertools fixer fails

2011-08-10 Thread Meador Inge
Changes by Meador Inge : -- nosy: +meador.inge ___ Python tracker <http://bugs.python.org/issue12613> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue4841] io's close() not handling errors correctly

2011-08-10 Thread Meador Inge
Changes by Meador Inge : -- stage: needs patch -> patch review ___ Python tracker <http://bugs.python.org/issue4841> ___ ___ Python-bugs-list mailing list Un

[issue12608] crash in PyAST_Compile when running Python code

2011-08-10 Thread Meador Inge
Meador Inge added the comment: OK, I am marking this as fixed then. If someone decides to fix this in 3.2 or 3.7, then they can reopen the issue. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _

[issue12608] crash in PyAST_Compile when running Python code

2011-08-10 Thread Meador Inge
Meador Inge added the comment: I have verified that the code checked in for issue12575 keep the test case from this issue from crashing the interpreter: [meadori@motherbrain cpython]$ ./python test.py Traceback (most recent call last): File "test.py", line 14, in compiled

[issue12608] crash in PyAST_Compile when running Python code

2011-08-06 Thread Meador Inge
Meador Inge added the comment: Thanks for the test case Albert. The attached patch adds a unit test based off of the given repro case and fixes the bug in the FunctionDef compiler. The compiler was hitting a NULL pointer deref on FunctionDefs with empty list bodies. Reproduced and fixed

[issue11241] ctypes: subclassing an already subclassed ArrayType generates AttributeError

2011-04-18 Thread Meador Inge
Meador Inge added the comment: > But what happens with a third level? That doesn't work. I have a test case for that, but the test case has a typo that caused it to pass. I will fix the test case and the code. Thanks. -- ___ Python tracke

[issue10910] pyport.h FreeBSD/Mac OS X "fix" causes errors in C++ compilation

2011-04-17 Thread Meador Inge
Changes by Meador Inge : -- components: +Macintosh ___ Python tracker <http://bugs.python.org/issue10910> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10910] pyport.h FreeBSD/Mac OS X "fix" causes errors in C++ compilation

2011-04-17 Thread Meador Inge
Meador Inge added the comment: This doesn't look like it has anything to to with the 'ctypes' library component (http://docs.python.org/library/ctypes). So I am removing 'ctypes' from the 'Components' selection. Please correct me if I am wrong ... ---

[issue11241] ctypes: subclassing an already subclassed ArrayType generates AttributeError

2011-04-17 Thread Meador Inge
Meador Inge added the comment: Verified that this is still broken in the main development branch. The base type should be checked for '_type_' or '_length_' before throwing an error. Attached is a patch that fixes the problem and adds covering tests. The full test

[issue9651] ctypes crash when writing zerolength string buffer to file

2011-04-16 Thread Meador Inge
Meador Inge added the comment: This crash still occurs in the main development branch and Amaury's patch still fixes the problem. I verified that all tests pass on OS X 10.6.5. It should be OK to commit. -- assignee: theller -> nosy: +meador.inge -theller versions: +Py

[issue9041] raised exception is misleading

2011-04-16 Thread Meador Inge
Meador Inge added the comment: This problem still occurs in the main development branch. I think the 'PyErr_ExceptionMatches' check that Pauli suggested will work. The same problem exist for 'c_float', 'c_double', and 'c_longdouble'. Attached is a

[issue11477] Bug in code dispatching based on internal slots

2011-03-13 Thread Meador Inge
Changes by Meador Inge : -- nosy: +meador.inge ___ Python tracker <http://bugs.python.org/issue11477> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue3132] implement PEP 3118 struct changes

2011-03-12 Thread Meador Inge
Meador Inge added the comment: Is there still any interest in this work? -- ___ Python tracker <http://bugs.python.org/issue3132> ___ ___ Python-bugs-list mailin

[issue3132] implement PEP 3118 struct changes

2011-01-06 Thread Meador Inge
Meador Inge added the comment: Attached is the latest version of the struct string patch. I tested on OS X 10.6.5 (64-bit) and Ubuntu 10.04 (32-bit). I also scanned for memory problems with Valgrind. There is one test failing on 32-bit systems ('test_crasher'). This is due t

[issue10044] small int optimization

2011-01-01 Thread Meador Inge
Meador Inge added the comment: > How is the compiler supposed to know whether a and b belong to the same > array when compiling ptr_compare? I agree with Mark, it doesn't need to know. However, many compilers [1,2] support whole program optimization and could in theory figure the

[issue9969] tokenize: add support for tokenizing 'str' objects

2010-09-28 Thread Meador Inge
Changes by Meador Inge : -- components: +Library (Lib) ___ Python tracker <http://bugs.python.org/issue9969> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9969] tokenize: add support for tokenizing 'str' objects

2010-09-28 Thread Meador Inge
New submission from Meador Inge : Currently with 'py3k' only 'bytes' objects are accepted for tokenization: >>> import io >>> import tokenize >>> tokenize.tokenize(io.StringIO("1+1").readline) Traceback (most recent call last): File

[issue2180] tokenize: mishandles line joining

2010-09-26 Thread Meador Inge
Changes by Meador Inge : -- nosy: +meador.inge ___ Python tracker <http://bugs.python.org/issue2180> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9788] atexit and execution order

2010-09-12 Thread Meador Inge
Meador Inge added the comment: I agree with Antoine's LIFO comment. Also, FWIW, the C standard library behaves in a LIFO manner as well (C99 spec - 7.20.4.3 clause 3): "First, all functions registered by the atexit function are called, in the reverse order of their registration,2

[issue9756] Crash with custom __getattribute__

2010-09-05 Thread Meador Inge
Meador Inge added the comment: > To fix the segfault, I suppose that we use a more strict validation on > the input type. Eg. Use PyUnicode_Check() instead of > PyObject_IsInstance()? Where would the more strict validation take place? This problem is not unique to Unicod

[issue5109] array.array constructor very slow when passed an array object.

2010-09-02 Thread Meador Inge
Meador Inge added the comment: Overall, this patch look reasonable. I tested on py3k and the the tests pass. I also did a few micro-benchmarks to verify the speedup. One question I do have, though, is whether the 'len' calculation modifications are necessary? This looks like

[issue9633] pdb go stack up/down

2010-09-01 Thread Meador Inge
Meador Inge added the comment: I believe this is slightly tricky because 'bdb.format_stack_entry' makes references to '.f_locals' and 'bdb.format_stack_entry' is invoked in several places in 'pdb'. One option would be to add a extra parameter

[issue9633] pdb go stack up/down

2010-08-30 Thread Meador Inge
Changes by Meador Inge : -- nosy: +meador.inge ___ Python tracker <http://bugs.python.org/issue9633> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1172711] long long support for array module

2010-08-24 Thread Meador Inge
Meador Inge added the comment: Overall the patch looks good. I don't think it is an extremely important feature, but similar support is already available in other places (e.g. 'struct', 'ctypes'). Here is a patch updated for py3k with some minor addition

[issue3132] implement PEP 3118 struct changes

2010-08-14 Thread Meador Inge
Changes by Meador Inge : -- assignee: teoliphant -> meador.inge priority: critical -> high stage: unit test needed -> needs patch ___ Python tracker <http://bugs.python.o

[issue1172711] long long support for array module

2010-08-03 Thread Meador Inge
Changes by Meador Inge : -- nosy: +minge ___ Python tracker <http://bugs.python.org/issue1172711> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue5248] Adding T_SIZET to structmember.h

2010-08-03 Thread Meador Inge
Changes by Meador Inge : -- nosy: +minge ___ Python tracker <http://bugs.python.org/issue5248> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue4188] Lib/threading.py causes infinite recursion when running as verbose

2010-08-03 Thread Meador Inge
Changes by Meador Inge : -- nosy: +minge ___ Python tracker <http://bugs.python.org/issue4188> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue9249] struct.pack and Long Integer datatype should be 4, but is 8 bytes

2010-08-01 Thread Meador Inge
Changes by Meador Inge : -- nosy: +minge ___ Python tracker <http://bugs.python.org/issue9249> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue5077] 2to3 fixer for the removal of operator functions

2010-08-01 Thread Meador Inge
Meador Inge added the comment: Sure. I take it you meant http://svn.python.org/projects/sandbox/trunk/2to3, though. Is this the location that all patches for 2to3 should be produced against? I dropped the documentation changes b/c I did not see any docs in the 2to3 trunk. Should the doc

[issue9011] ast_for_factor unary minus optimization changes AST

2010-06-21 Thread Meador Inge
Changes by Meador Inge : -- nosy: +minge ___ Python tracker <http://bugs.python.org/issue9011> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue8748] integer-to-complex comparisons give incorrect results

2010-05-30 Thread Meador Inge
Meador Inge added the comment: [Mark] > Can you think of any reason that we shouldn't just copy the py3k > implementation ... Not that I can think of. Like you pointed out, we should have removed the coercion from the rich comparison when fixing issue 5211. > Thanks for all

[issue2470] Need fixer for dl (removed) -> ctypes module

2010-05-29 Thread Meador Inge
Changes by Meador Inge : -- stage: -> needs patch type: -> feature request ___ Python tracker <http://bugs.python.org/issue2470> ___ ___ Python-bugs-list

[issue8748] integer-to-complex comparisons give incorrect results

2010-05-29 Thread Meador Inge
Changes by Meador Inge : -- stage: -> patch review ___ Python tracker <http://bugs.python.org/issue8748> ___ ___ Python-bugs-list mailing list Unsubscri

[issue8748] integer-to-complex comparisons give incorrect results

2010-05-29 Thread Meador Inge
Meador Inge added the comment: > I'm not sure that's a good idea: mightn't this change behaviour for > user-defined classes with a __coerce__ method? Maybe it would be > better to just special-case ints and longs at the start of > complex_richcompare, and then le

[issue8748] integer-to-complex comparisons give incorrect results

2010-05-21 Thread Meador Inge
Meador Inge added the comment: > Hmm. The current Python 2.7 behaviour really is a mess. No doubt! > Your patch removes the coercion entirely; Yeah, I know. The funny thing about this is that according to the documentation [1]: "Arguments to rich comparison methods are ne

[issue8748] integer-to-complex comparisons give incorrect results

2010-05-20 Thread Meador Inge
Meador Inge added the comment: 2.7 patch attached. The implementation is mostly the same as the 3.2 one, but there is one quirk. Namely, 2.7 (and other 2.x's) has the following odd behavior: >>> 1j < None False >>> 1j < 1 Traceback (most recent cal

[issue8748] integer-to-complex comparisons give incorrect results

2010-05-20 Thread Meador Inge
Meador Inge added the comment: No problem! I have attached the updated patch. I am starting on the 2.7 patch now. -- Added file: http://bugs.python.org/file17424/issue-8748.2.patch ___ Python tracker <http://bugs.python.org/issue8

[issue3132] implement PEP 3118 struct changes

2010-05-20 Thread Meador Inge
Meador Inge added the comment: > Granted, yes. But I wouldn't expect the same padding for 'BT{BI}' and > 'BBI'. 'BT{BI}' should match a C struct which itself has an embedded > struct. For C, I get the following results on my machine: I wasn

[issue8748] integer-to-complex comparisons give incorrect results

2010-05-20 Thread Meador Inge
Meador Inge added the comment: > Thanks for the updated patch; I'll take a closer look tonight, and > apply it if all looks good. I incorporated the changes locally and have not updated the patch yet. I will update it later today. -- ___

[issue3132] implement PEP 3118 struct changes

2010-05-20 Thread Meador Inge
Meador Inge added the comment: > As a separate issue, I notice that the new 'T{}' code doesn't respect > multiplicities, e.g., as in 'H3T{HHL}'. Is that > intentional/desirable? That could have been an oversight on my part. I don't see any immediate r

[issue8748] integer-to-complex comparisons give incorrect results

2010-05-20 Thread Meador Inge
Meador Inge added the comment: Thanks for the review. I incorporated the check re-orderings. I am also writing more tests. Which already exposed a subtly that I was not expecting: Python 3.2a0 (py3k:81284M, May 20 2010, 09:08:20) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin Type "

[issue3132] implement PEP 3118 struct changes

2010-05-20 Thread Meador Inge
Meador Inge added the comment: > is that correct, or should the production list be something like: Yup, you are right. I will change the grammar. > Whether these cases are valid or not (personally, I think they should > be), we should add some tests for them. '<' *

[issue7902] relative import broken

2010-05-19 Thread Meador Inge
Meador Inge added the comment: Does this patch seem reasonable? -- ___ Python tracker <http://bugs.python.org/issue7902> ___ ___ Python-bugs-list mailin

[issue8748] integer-to-complex comparisons give incorrect results

2010-05-19 Thread Meador Inge
Meador Inge added the comment: > For a complex number z and an integer i, 'z == i' should be exactly > equivalent to 'z.real == i and z.imag == 0.0'. Like you mentioned before a lot of care is taken in 'floatobject.c' to ensure that the comparison is rob

[issue3132] implement PEP 3118 struct changes

2010-05-18 Thread Meador Inge
Meador Inge added the comment: Sure - http://codereview.appspot.com/1258041 -- ___ Python tracker <http://bugs.python.org/issue3132> ___ ___ Python-bugs-list m

[issue3132] implement PEP 3118 struct changes

2010-05-17 Thread Meador Inge
Meador Inge added the comment: Attached is a patch that implements part of the additions. More specifically, the 'T{}' syntax and the ability to place byte-order specifiers ('<', '>', '@', '^', '!", '=') anywhere in

[issue7355] Struct incorrectly compiles format strings

2010-04-12 Thread Meador Inge
Meador Inge added the comment: Those last two sentences where meant to be in response to your "Merged your changes and subsequent tweaks to py3k in r80016." comment. I tried to reply to the tracker from my mail client and things got r

[issue7355] Struct incorrectly compiles format strings

2010-04-12 Thread Meador Inge
Meador Inge added the comment: > Sure, if you want to. [Then I won't be able to reproduce what's in the > docs on either of my machines. :) One's 32-bit big-endian; the other's > 64-bit little-endian.] > I guess it's painful either way. I think the only

[issue7355] Struct incorrectly compiles format strings

2010-04-12 Thread Meador Inge
Meador Inge added the comment: > wonder whether they should be converted to little-endian I thought about that as well. It sure would make creating new examples easier :) I had to construct the new examples "by hand". I can regenerate the examples for little-endian if y

[issue7433] MemoryView memory_getbuf causes segfaults, double call to tp_releasebuffer

2010-04-11 Thread Meador Inge
Changes by Meador Inge : -- nosy: +minge ___ Python tracker <http://bugs.python.org/issue7433> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue7355] Struct incorrectly compiles format strings

2010-04-10 Thread Meador Inge
Meador Inge added the comment: > would be to add enough padding so that the alignment of the struct > matches the largest alignment of any member of the struct. That might work. I will have to think about it a bit. > On the subject of documentation Attached a doc patch which

[issue7355] Struct incorrectly compiles format strings

2010-04-10 Thread Meador Inge
Meador Inge added the comment: > I'm half-convinced that struct.pack *should* ideally add trailing > padding in the same situation that C does, for consistency with C. > Then calcsize would match C's sizeof. Maybe... AFAIK, the C language does not mandate structure paddi

[issue7355] Struct incorrectly compiles format strings

2010-04-10 Thread Meador Inge
Changes by Meador Inge : -- nosy: +minge ___ Python tracker <http://bugs.python.org/issue7355> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue8300] Allow struct.pack to handle objects with an __index__ method.

2010-04-04 Thread Meador Inge
Meador Inge added the comment: Looks good to me. -- status: pending -> open ___ Python tracker <http://bugs.python.org/issue8300> ___ ___ Python-bugs-list mai

[issue8300] Allow struct.pack to handle objects with an __index__ method.

2010-04-03 Thread Meador Inge
Meador Inge added the comment: I may be missing something subtle, but how can 'PyNumber_Index(v) != NULL' *and* '!PyInt_Check(v) && !PyLong_Check(v)' both be satisfied in the 'get_pylong' mods? It seems to me that 'PyNumber_Index' only return

[issue7994] object.__format__ should reject format strings

2010-03-30 Thread Meador Inge
Meador Inge added the comment: Hi Eric, (-2) and (-3) are different. The changes that I made, however, are pretty minor. Also, they are all in 'test_builtin.py'. -- ___ Python tracker <http://bugs.python.

[issue1530559] struct.pack raises TypeError where it used to convert

2010-03-08 Thread Meador Inge
Meador Inge added the comment: > (2) For 2.x, I'm a bit uncomfortable with introducing the extra Python layer > on top of the C layer. Partly I'm worried about accidentally breaking > something (it's not 100% clear to me whether there might be hidden > side-ef

[issue8039] precedence rules for ternary operator

2010-03-06 Thread Meador Inge
Meador Inge added the comment: It seems to me from the grammar (http://docs.python.org/reference/expressions.html#grammar-token-conditional_expression) that the precedence for conditional expressions fall in between that of 'lambda' and 'or' expressions. -- k

[issue1530559] struct.pack raises TypeError where it used to convert

2010-03-06 Thread Meador Inge
Meador Inge added the comment: > If anyone's interested in submitting a patch, it would be welcome. Sure. I saw where this was partly addressed in r78690. The attached patch adds support for the '__index__' conversion that Mark suggested. At first glance, the patch

[issue7232] Support of 'with' statement fo TarFile class

2010-02-28 Thread Meador Inge
Meador Inge added the comment: > This is common practice in the standard library. This doesn't necessarily mean it is a correct practice :-). All kidding aside, I think the assumption that the standard documentation on '__enter__' and '__exit__' is sufficient is

[issue7232] Support of 'with' statement fo TarFile class

2010-02-27 Thread Meador Inge
Meador Inge added the comment: > What about changing the exception test to something like what I did in > > issue7232.4.diff? That is definitely more succinct, but Lars' solution provides more information about _why_ the test fails. IMHO, the descriptiveness is more

<    1   2   3   4   5   6   7   >