Bugs item #1647541, was opened at 2007-01-30 00:04 Message generated for change (Comment added) made by arigo 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: None Status: Open Resolution: None 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: Armin Rigo (arigo) Date: 2007-01-30 13: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 05: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