[Python-Dev] getslice usage in sre_parse (original) (raw)
Guido van Rossum guido at python.org
Sun Apr 30 17:30:56 CEST 2006
- Previous message: [Python-Dev] __getslice__ usage in sre_parse
- Next message: [Python-Dev] elimination of scope bleeding of iteration variables
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 4/28/06, Sanghyeon Seo <sanxiyn at gmail.com> wrote:
Hello,
Python language reference 3.3.6 deprecates getslice. I think it's okay that UserList.py has it, but sreparse shouldn't use it, no?
Well, as long as the deprecated code isn't removed, there's no reason why other library code shouldn't use it. So I disagree that technically there's a reason why sre_parse shouldn't use it.
getslice is not implemented in IronPython and this breaks usage of sre.py, a pure-Python implementation of sre, on IronPython: http://ubique.ch/code/sre/
sre.py is needed for me because IronPython's own regex implementation using underlying .NET implementation is not compatible enough for my applications. I will write a separate bug report for this. It should be a matter of removing getslice and adding isinstance(index, slice) check in getitem. I would very much appreciate it if this is fixed before Python 2.5.
You can influence the fix yourself -- please write a patch (relative to Python 2.5a2 that was just released), submit it to Python's patch tracker on SourceForge (read python.org/dev first), and then sending an email here to alert the developers. This ought to be done well before the planned 2.5b1 release (see PEP 256 for the 2.5 release timeline). You should make sure that the patched Python 2.5 passes all unit tests before submitting your test.
Good luck!
-- --Guido van Rossum (home page: http://www.python.org/~guido/)
- Previous message: [Python-Dev] __getslice__ usage in sre_parse
- Next message: [Python-Dev] elimination of scope bleeding of iteration variables
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]