Bugs item #1647541, was opened at 2007-01-29 19:04
Message generated for change (Comment added) made by rhettinger
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1647541&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Extension Modules
>Group: Python 2.5
>Status: Closed
>Resolution: Fixed
Priority: 4
Private: No
Submitted By: Armin Rigo (arigo)
Assigned to: Armin Rigo (arigo)
Summary: SystemError with re.match(array)

Initial Comment:
An small issue which I guess is to be found in
the implementation of the buffer interface
for zero-length arrays:

>>> a = array.array("c")
>>> r = re.compile("bla")
>>> r.match(a)
SystemError: error return without exception set

----------------------------------------------------------------------

>Comment By: Raymond Hettinger (rhettinger)
Date: 2007-04-02 17:54

Message:
Logged In: YES 
user_id=80475
Originator: NO

Fixed in versions 54662 and 54663.
Now returns a buffer of length zero other than NULL.


----------------------------------------------------------------------

Comment By: Armin Rigo (arigo)
Date: 2007-01-30 08:37

Message:
Logged In: YES 
user_id=4771
Originator: YES

It seems to me that an empty array should be
equivalent to an empty string.  Accessing it as a
buffer should return a buffer of length 0, not
raise ValueError.

In all cases, the fix in _sre.c is sensible.

----------------------------------------------------------------------

Comment By: Neal Norwitz (nnorwitz)
Date: 2007-01-30 00:21

Message:
Logged In: YES 
user_id=33168
Originator: NO

Armin, what do you think of the attached patch?
File Added: empty-array.diff

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1647541&group_id=5470
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to