[issue3825] Major reworking of Python 2.5.2 re module

2008-09-21 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: Needed to correct regex_2.6rc2+2.diff. Added file: http://bugs.python.org/file11553/regex_2.6rc2+2.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3825] Major reworking of Python 2.5.2 re module

2008-09-21 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: regex_2.6rc2+3.diff adds reverse searching with the re.REVERSE/re.R and "(?r)" flag. This gives results such as: >>> re.findall("(\w+)", "one two three") ['one', 'two', &#x

[issue516762] have a way to search backwards for re

2008-09-21 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: Implemented as part of #3825. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue516762> ___

[issue3825] Major reworking of Python 2.5.2 re module

2008-09-22 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: regex_2.6rc2+4.diff fixes the ordering of the capture groups for reverse searching. Added file: http://bugs.python.org/file11558/regex_2.6rc2+4.diff ___ Python tracker <[EMAIL PROTECTE

[issue3825] Major reworking of Python 2.5.2 re module

2008-09-22 Thread Matthew Barnett
Changes by Matthew Barnett <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file11558/regex_2.6rc2+4.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3825] Major reworking of Python 2.5.2 re module

2008-09-22 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: Correction of regex_2.6rc2+4.diff. (Aargh!) Added file: http://bugs.python.org/file11559/regex_2.6rc2+4.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue433031] SRE: x++ isn't supported

2008-09-22 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: Implemented in #2636 and #3825. -- nosy: +mrabarnett ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.

[issue3825] Major reworking of Python 2.5.2 re module

2008-09-23 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: Patch regex_2.6rc2+5.diff adds scoped and 'negative' flags for (?i), (?m) and (?s). The other flags remain unchanged in behaviour. See #433024, #433027 and #433028. Added file: http://bugs.python.org/file11585/reg

[issue433024] SRE: (?flag) isn't properly scoped

2008-09-23 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: Implemenetd in #3825. -- nosy: +mrabarnett ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.

[issue433027] SRE: (?-flag) is not supported.

2008-09-23 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: Implemented in #3825. -- nosy: +mrabarnett ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.

[issue433028] SRE: (?flag:...) is not supported

2008-09-23 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: Implemented in #3825. -- nosy: +mrabarnett ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.

[issue3825] Major reworking of Python 2.5.2 re module

2008-09-23 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: Patch regex_2.6rc2+6.diff is a bugfix. Added file: http://bugs.python.org/file11587/regex_2.6rc2+6.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2008-09-24 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: Comparing item 2 and item 3, I think that item 3 is the Pythonic choice and item 2 is a bad idea. Item 4: back-references in the pattern are like \1 and (?P=name), not \g<1> or \g, and in the replacement string are like \g<1&

[issue1647489] zero-length match confuses re.finditer()

2008-09-24 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: This also affects re.findall(). -- nosy: +mrabarnett ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.o

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2008-09-24 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: Regarding item 22: there's also #1647489 ("zero-length match confuses re.finditer()"). This had me stumped for a while, but I might have a solution. I'll see whether it'll fix item 22 too. I wasn't plan

[issue1647489] zero-length match confuses re.finditer()

2008-09-24 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: What should: [m.groups() for m in re.finditer(r'(^z*)|(^q*)|(\w+)', 'abc')] return? Should the second group also yield a zero-width match before the third group is tried? I think it

[issue1647489] zero-length match confuses re.finditer()

2008-09-24 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: What about r'(^z*)|(q*)|(\w+)'? I could imagine that the first group could match only at the start of the string, but if the second group doesn't have that restriction then it could match the second time, and only after

[issue3959] Add Google's ipaddr.py to the stdlib

2008-09-24 Thread Matthew Smart
Changes by Matthew Smart <[EMAIL PROTECTED]>: -- nosy: +mattsmart ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3959> ___ __

[issue1647489] zero-length match confuses re.finditer()

2008-09-24 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: FYI, I posted msg73737 after finding that the fix for the original case was really very simple, but then thought about whether it would behave as expected when there were more zero-width matches, hence the later

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2008-09-25 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: Just out of interest, is there any plan to include #1160 while we're at it? ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2008-09-25 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: For reference, these are all the regex-related issues that I've found (including this one!): id : activity : title #2636: 25/09/08 : Regexp 2.7 (modifications to current re 2.2.2) #1160: 25/09/08 : Medium size reg

[issue1647489] zero-length match confuses re.finditer()

2008-09-25 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: I have to report that the fix appears to be successful: >>> print [m.groups() for m in re.finditer(r'(^z*)|(\w+)', 'abc')] [('', None), (None, 'abc')] >>> print re.findall(r&

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2008-09-25 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: #814253 is part of the fix for variable-width lookbehind. BTW, I've just tried a second time to register with Launchpad, but still no reply. :-( ___ Python tracker <[EMAIL PRO

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2008-09-25 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: Tried [EMAIL PROTECTED] twice, no reply. Succeeded with [EMAIL PROTECTED] ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2008-09-25 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: I've been completely unable to get Bazaar to work with Launchpad: authentication errors and bzrlib.errors.TooManyConcurrentRequests. ___ Python tracker <[EMAIL PROTECTED]> <ht

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2008-09-26 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: I have it working finally! ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2636> ___ _

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2008-09-26 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: I did a search on the permissions problem: https://answers.launchpad.net/bzr/+question/34332. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2008-09-27 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: I haven't yet found out how to turn on compression when getting the branches, so I've only looked at lp:~pythonregexp2.7/python/issue2636+01+09-02+17+18+19+20+21+24+26. I did see that the SRE_FLAG_REVERSE flag was miss

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2008-09-29 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: issue2636-01+09-02+17_backport.diff is the backport fix. Still unable to compress the download, so that's >200MB each time! Added file: http://bugs.python.org/file11657/issue2636-01+09-02+17

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2008-09-30 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: The explanation of the zero-width bug is incorrect. What happens is this: The functions for finditer(), findall(), etc, perform searches and want the next one to continue from where the previous match ended. However, if the mat

[issue694374] Recursive regular expressions

2008-09-30 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: I'll have a look at this. No promises, though. -- nosy: +mrabarnett ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.py

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2008-10-02 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: I've found an interesting difference between Python and Perl regular expressions: In Python: \Z matches at the end of the string In Perl: \Z matches at the end of the string or before a newline at the

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2008-10-02 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: Perl v5.10 offers the ability to have duplicate capture group numbers in branches. For example: (?|(a)|(b)) would number both of the capture groups as group 1. Something to include? ___

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2008-10-02 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: I've extended the group referencing. It now has: Forward group references (\2two|(one))+ \g-type group references (n is name or number) \g (Python re replacement string) \g{n} (Perl) \g'n' (Per

[issue694374] Recursive regular expressions

2008-10-13 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: Perl (?number) for calling numbered groups and (?&name) for named groups (Perl also supports (?P>name)). (?R) is equivalent to (?0). It's interesting that the documentation for both Perl and PCRE say that they support

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-02-03 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-20100204.zip is a new version of the regex module. I've added splititer and added a build for Python 3.1. -- versions: +Python 3.1 Added file: http://bugs.python.org/file16122/issue2636-2010020

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-02-09 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-20100210.zip is a new version of the regex module. The reported bugs appear to be fixed now. -- Added file: http://bugs.python.org/file16195/issue2636-20100210.zip ___ Python tracker <h

[issue1160] Medium size regexp crashes python

2010-02-09 Thread Matthew Barnett
Matthew Barnett added the comment: As stated in msg73781, this is being addressed in issue #2636. My regex module handles the test case without complaint: >>> import regex >>> r = regex.compile('|'.join('%d'%x for x in range(7000))) >>> r.match(&

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-02-10 Thread Matthew Barnett
Matthew Barnett added the comment: I've been aware for some time that exception messages in Python 2 can't be Unicode, but I wasn't sure which encoding to use, so I've decided to use that of sys.stdout. It appears to work OK in IDLE and at the Python prompt. issue2636

[issue7910] immutability w/r to tuple.__add__

2010-02-11 Thread Matthew Russell
New submission from Matthew Russell : Tuples, as we know are designed to immutable. Hence I'm questioning if the following behavior is considered a defect: >>> t = (1, 2) >>> t += (1, 2, 3) >>> t (1, 2, 3) ? -- components: Interpreter Core messages:

[issue7910] immutability w/r to tuple.__add__

2010-02-11 Thread Matthew Russell
Matthew Russell added the comment: Yes, the output is fishy indeed my bad (paste error). Tim: I hadn't thought for long enough or thought to check with the id builtin - nice catch. -- status: open -> closed ___ Python tracke

[issue2537] re.compile(r'((x|y+)*)*') should fail

2010-02-11 Thread Matthew Barnett
Matthew Barnett added the comment: The re module is addressed in issue #2636. BTW, my regex module behaves like Ruby: >>> regex.sub(r"((x|y)*)*", "(\\1, \\2)", "xyyzy", count=1) '(, y)zy' >>> regex.sub(r"((x|y+)*)*", &quo

[issue2537] re.compile(r'((x|y+)*)*') should fail

2010-02-11 Thread Matthew Barnett
Matthew Barnett added the comment: The issue started about updating the re module and adding features that other languages already possess in their regex implementations (the last time any significant work was done on it was in 2003). The hope is that the new regex implementation will

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-02-17 Thread Matthew Barnett
Matthew Barnett added the comment: The main text at http://pypi.python.org/pypi/regex appears to have lost its backslashes, for example: The Unicode escapes u and U are supported. instead of: The Unicode escapes \u and \U are supported

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-02-17 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-20100218.zip is a new version of the regex module. I've added '.' to the permitted characters when parsing the name of a property. The name itself is no longer reported in the error message. I've also corrected the positi

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-02-18 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-20100219.zip is a new version of the regex module. The regex module should give the same results as the re module for backwards compatibility. The ignorecase bug is now fixed. This new version releases the GIL when matching on str and bytes (str

[issue7951] Should str.format allow negative indexes when used for __getitem__ access?

2010-02-18 Thread Matthew Barnett
Matthew Barnett added the comment: On a related note, this doesn't work either: >>> "{-1}".format("x", "y", "z") Traceback (most recent call last): File "", line 1, in "{-1}".format("x", "y"

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-02-22 Thread Matthew Barnett
Matthew Barnett added the comment: I don't know what happened there. I didn't notice that the zip file was way too small. Here's a replacement (still called issue2636-20100222.zip). Unicode script properties are already included, at least those whose definitions at htt

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-02-22 Thread Matthew Barnett
Matthew Barnett added the comment: OK, you've convinced me, \X is supported. :-) issue2636-20100223.zip is a new version of the regex module. -- Added file: http://bugs.python.org/file16331/issue2636-20100223.zip ___ Python tracker

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-02-24 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-20100224.zip is a new version of the regex module. It includes support for matching based on Unicode scripts as well as on Unicode blocks and properties. -- Added file: http://bugs.python.org/file16362/issue2636-20100224.zip

[issue1528154] New sequences for Unicode groups and block ranges needed

2010-02-25 Thread Matthew Barnett
Matthew Barnett added the comment: \p{name} is supported for Unicode properties, scripts and blocks in my regex module (see issue #2636). It also supports the POSIX set syntax, although I'm not sure that we really need to have 2 ways of doing it, eg \p{Alpha} and [[:

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-02-25 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-20100226.zip is a new version of the regex module. It now supports the branch reset (?|...|...), enabling the different branches of an alternation to reuse group numbers. -- Added file: http://bugs.python.org/file16375/issue2636-20100226

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-03-03 Thread Matthew Barnett
Matthew Barnett added the comment: \X shouldn't be allowed in a character class because it's equivalent to \P{M}\p{M}*. It's a bug, now fixed in issue2636-20100304.zip. I'm not convinced about the set intersection and difference stuff. Isn't that overdoing it a litt

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-03-22 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-20100323.zip is a new version of the regex module. It now includes a test script. Most of the tests come from the existing test scripts. -- Added file: http://bugs.python.org/file16626/issue2636-20100323.zip

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-03-31 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-20100331.zip is a new version of the regex module. It includes speed-ups and a minor bugfix. -- Added file: http://bugs.python.org/file16709/issue2636-20100331.zip ___ Python tracker <h

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-04-12 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-20100413.zip is a new version of the regex module. It includes additional speed-ups. -- Added file: http://bugs.python.org/file16905/issue2636-20100413.zip ___ Python tracker <http://bugs.python.

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-04-13 Thread Matthew Barnett
Matthew Barnett added the comment: Yes, it passed all the tests, although I've since found a minor bug that isn't covered/caught by them, so I'll need to add a few more tests. Anyway, do: regex.match(ur"\p{Ll}", u"a") regex.match(ur'(?u)\w'

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-04-13 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-20100414.zip is a new version of the regex module. I think I might have identified the cause of the problem, although I still haven't been able to reproduce it, so I can't be certain. --

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-04-13 Thread Matthew Barnett
Matthew Barnett added the comment: Oops, forgot the file! :-) -- Added file: http://bugs.python.org/file16916/issue2636-20100414.zip ___ Python tracker <http://bugs.python.org/issue2

[issue8465] Backreferences vs. escapes: a silent failure solved

2010-04-20 Thread Matthew Barnett
Matthew Barnett added the comment: Octal escapes are at most 3 octal digits, so the normal way to handle "\41" + "1" is "\0411". Some languages support variable-length hex escapes of the form "\x{1B}", so we could add that and also "\o{41}"

[issue8493] socket's send can raise errno 35 under OS X, which causes problems in sendall

2010-04-21 Thread Matthew Cowles
New submission from Matthew Cowles : [From a question first posted to python-help] A socket's send function may return 0 if no bytes have been sent. Under at least OS X 10.6.2, it may also raise errno 35 (resource temporarily unavailable) if no network buffers are available. If a Python

[issue8493] socket's send can raise errno 35 under OS X, which causes problems in sendall

2010-04-23 Thread Matthew Cowles
Matthew Cowles added the comment: > if you get this type of error, it's probably because you're using non- > blocking sockets That's what I thought at first too. But the user's sockets were set to blocking. > spinning around the send call trying to resend the d

[issue8511] Small mistake in tutorial web page

2010-04-23 Thread Matthew Cowles
New submission from Matthew Cowles : [Originally from a post to the python-help list] Over at: http://docs.python.org/py3k/tutorial/datastructures.html#sets it says: >>> fruit = ['apple', 'orange', 'apple', 'pear', 'orange', &#x

[issue8493] socket's send can raise errno 35 under OS X, which causes problems in sendall

2010-04-26 Thread Matthew Cowles
Matthew Cowles added the comment: [Replying to various posts] [neologix] > That's one broken networking stack... I'm not disagreeing, but you'd have to take that up with Apple. > How would you circumvent this problem anyway ? The code has to go around again in the case

[issue3262] re.split doesn't split with zero-width regex

2010-04-26 Thread Matthew Barnett
Matthew Barnett added the comment: You could try the regex module mentioned in issue 2636. -- ___ Python tracker <http://bugs.python.org/issue3262> ___ ___ Pytho

[issue8493] socket's send can raise errno 35 under OS X, which causes problems in sendall

2010-04-26 Thread Matthew Cowles
Matthew Cowles added the comment: > A minimal example which reproduces the behavior. :) Unfortunately the problem wasn't mine originally. I'm just the guy on python-help who happened to figure out the answer. But if someone can get me access to an FTP server on the other end o

[issue8493] socket's send can raise errno 35 under OS X, which causes problems in sendall

2010-04-27 Thread Matthew Cowles
Matthew Cowles added the comment: Apologies! Further investigation indicates that the user had set a timeout in the ftplib module. I'll close this. In an ideal world, errors due to timeouts would look like they were related to timeouts. But that's a different matter

[issue8672] Error decompressing valid zlib data

2010-05-09 Thread Matthew Brett
New submission from Matthew Brett : I have a valid zlib compressed string, attached here as 'mat.bin' (1.7M), that cause and error on zlib.decompress decompression: >>> import zlib >>> data = open('mat.bin', 'rb').read() >>> out = zlib.d

[issue8672] Error decompressing valid zlib data

2010-05-10 Thread Matthew Brett
Matthew Brett added the comment: Hi, > Antoine Pitrou added the comment: > > After a bit of debugging, it seems your data is not actually a complete zlib > stream (*). What did you generate it with? > > (*) in technical terms, the zlib never returns Z_STREAM_END when &g

[issue8672] Error decompressing valid zlib data

2010-05-10 Thread Matthew Brett
Matthew Brett added the comment: >> Thanks for the debugging.  The stream comes from within a matlab 'mat' >> file.  I maintain the scipy matlab file readers; the variables within >> these files are zlib compressed streams. > > So this would be a Matlab is

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2008-10-17 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: Further to msg74203, I can see no reason why we can't allow duplicate capture group names if the groups are on different branches are are thus mutually exclusive. For example: (?Pa)|(?Pb) Apart from this I think that dupl

[issue4328] "à" in u"foo" raises a misleading error

2008-11-15 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: The left operand is a bytestring and the right operand is a unicode string, so it makes sense that it raises an exception, although it would be clearer if it said "'in ' requires unicode string as left operand".

[issue4430] time.strptime does not allow same format directive twice

2008-11-25 Thread Matthew Barnett
Matthew Barnett <[EMAIL PROTECTED]> added the comment: Subversion is formatting a string from a time (strftime), so a repeated placeholder is OK. You're trying to _parse_ a time from a string (strptime). If you're telling it that 2 different parts of the string are the date, w

[issue4656] Python 3 tutorial has old information about dicts

2008-12-13 Thread Matthew Cowles
New submission from Matthew Cowles : [From a question sent to the python-help list.] In the Python 3 tutorial at: http://docs.python.org/3.0/tutorial/datastructures.html#dictionaries it says: The keys() method of a dictionary object returns a list of all the keys used in the dictionary, in

[issue3872] Python 2.6rc2: Tix ComboBox error

2008-12-30 Thread Matthew Karas
Matthew Karas added the comment: I'm sorry, will this fix get into a new release? I tried using a tix widget on 2.6.1 and got the same error. -- nosy: +lucidguppy ___ Python tracker <http://bugs.python.org/i

[issue4971] Incorrect title case

2009-01-17 Thread Matthew Barnett
New submission from Matthew Barnett : I've found that the following 4 Unicode characters/codepoints don't behave as I'd expect: Dž (U+01C5), Lj (U+01C8), Nj (U+01CB), Dz (U+01F2). For example, u'\u01C5'.istitle() returns True and unicodedata.category(u'\u01C5'

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2009-02-03 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-features.diff is based on Python 2.6. It includes: Named Unicode characters eg \N{LATIN CAPITAL LETTER A} Unicode character properties eg \p{Lu} (uppercase letter) and \P{Lu} (not uppercase letter) Other character properties not restricted to

[issue1519638] Unmatched Group issue - workaround

2009-02-05 Thread Matthew Barnett
Matthew Barnett added the comment: This has been addressed in issue #2636. -- nosy: +mrabarnett ___ Python tracker <http://bugs.python.org/issue1519638> ___ ___

[issue1693050] \w not helpful for non-Roman scripts

2009-02-05 Thread Matthew Barnett
Matthew Barnett added the comment: In issue #2636 I'm using the following: Alpha is Ll, Lo, Lt, Lu. Digit is Nd. Word is Ll, Lo, Lt, Lu, Mc, Me, Mn, Nd, Nl, No, Pc. These are what are specified at http://www.regular-expressions.info/posixbrackets.html -- nosy: +mraba

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2009-02-05 Thread Matthew Barnett
Matthew Barnett added the comment: Python 2.6 does (and probably Python 3.x, although I haven't checked): >>> u"\N{LATIN CAPITAL LETTER A}" u'A' If it's good enough for Python's Unicode string literals

[issue5165] os.rename and other raise WindowsError

2009-02-06 Thread Matthew Barnett
Matthew Barnett added the comment: WindowsError is a subclass of OSError, so it's not entirely contradictory, just a little misleading... :-) -- nosy: +mrabarnett ___ Python tracker <http://bugs.python.org/i

[issue5173] "What's new" claims StandardError was removed in 2.6

2009-02-06 Thread Matthew Woodcraft
New submission from Matthew Woodcraft : In the current "What's New In Python 3.0" documentation, under "Changes To Exceptions", it is claimed that the removal of StandardError is "in 2.6 already". But according to the 2.6.1 documentation, StandardErro

[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2009-02-07 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-features-2.diff is based on Python 2.6. Bugfix. No new features. Added file: http://bugs.python.org/file12974/issue2636-features-2.diff ___ Python tracker <http://bugs.python.org/issue2

[issue1721518] Small case which hangs

2009-02-08 Thread Matthew Barnett
Matthew Barnett added the comment: This problem has been addressed in issue #2636. Although the extra checks certainly aren't foolproof, neither of the examples given are slow. -- nosy: +mrabarnett ___ Python tracker <http://bugs.py

[issue1448325] re search infinite loop

2009-02-08 Thread Matthew Barnett
Matthew Barnett added the comment: This problem has been addressed in issue #2636. Although the extra checks certainly aren't foolproof, some regular expressions which were slow won't be any more. -- nosy: +mrabarnett ___ Python trac

[issue1566086] RE (regular expression) matching stuck in loop

2009-02-09 Thread Matthew Barnett
Matthew Barnett added the comment: This problem has been addressed in issue #2636. Extra checks have been added to reduce the amount of backtracking. -- nosy: +mrabarnett ___ Python tracker <http://bugs.python.org/issue1566

[issue1662581] the re module can perform poorly: O(2**n) versus O(n**2)

2009-02-09 Thread Matthew Barnett
Matthew Barnett added the comment: This has been addressed in issue #2636. -- nosy: +mrabarnett ___ Python tracker <http://bugs.python.org/issue1662581> ___ ___

[issue1662581] the re module can perform poorly: O(2**n) versus O(n**2)

2009-02-09 Thread Matthew Barnett
Matthew Barnett added the comment: The new code includes some extra checks which, although not foolproof, certainly reduce the amount of backtracking in a lot of cases. ___ Python tracker <http://bugs.python.org/issue1662

[issue43224] Add support for PEP 646

2022-03-10 Thread Matthew Rahtz
Change by Matthew Rahtz : -- pull_requests: +29905 pull_request: https://github.com/python/cpython/pull/31804 ___ Python tracker <https://bugs.python.org/issue43

[issue43224] Add support for PEP 646

2022-03-13 Thread Matthew Rahtz
Change by Matthew Rahtz : -- pull_requests: +29943 pull_request: https://github.com/python/cpython/pull/31844 ___ Python tracker <https://bugs.python.org/issue43

[issue43224] Add support for PEP 646

2022-03-13 Thread Matthew Rahtz
Change by Matthew Rahtz : -- pull_requests: +29944 pull_request: https://github.com/python/cpython/pull/31845 ___ Python tracker <https://bugs.python.org/issue43

[issue43224] Add support for PEP 646

2022-03-13 Thread Matthew Rahtz
Change by Matthew Rahtz : -- pull_requests: +29945 pull_request: https://github.com/python/cpython/pull/31846 ___ Python tracker <https://bugs.python.org/issue43

[issue47006] PEP 646: Decide on substitution behavior

2022-03-13 Thread Matthew Rahtz
Matthew Rahtz added the comment: Thanks for starting this, Jelle - I was a bit unsure about how to proceed here. Given that https://github.com/python/cpython/pull/31800 is already merged, I'd also propose something halfway between the two extremes: return a sensible substitution whe

[issue47006] PEP 646: Decide on substitution behavior

2022-03-13 Thread Matthew Rahtz
Matthew Rahtz added the comment: (Having said that, to be clear: my preferred solution currently would still be the solution where we just return a new GenericAlias for anything involving a TypeVarTuple. The crux is what Serhiy is happy with

[issue47023] re.sub shows key error on regex escape chars provided in repl param

2022-03-17 Thread Matthew Barnett
Matthew Barnett added the comment: I'd just like to point out that to a user it could _look_ like a bug, that an error occurred while reporting, because the traceback isn't giving a 'clean' report; the stuff about the KeyError i

[issue47081] Replace "qualifiers" with "quantifiers" in the re module documentation

2022-03-21 Thread Matthew Barnett
Matthew Barnett added the comment: I don't think it's a typo, and you could argue the case for "qualifiers", but I still agree with the proposal as it's a more meaningful term in the context. -- ___ Python tracker

[issue47006] PEP 646: Decide on substitution behavior

2022-03-21 Thread Matthew Rahtz
Matthew Rahtz added the comment: [Guido] > What would be an example of a substitution that's too complex to do? We also need to remember the dreaded arbitrary-length tuple. For example, I think it should be the case that: ```python T = TypeVar('T') Ts = TypeVarTuple(&#x

[issue47006] PEP 646: Decide on substitution behavior

2022-03-21 Thread Matthew Rahtz
Matthew Rahtz added the comment: P.s. To be clear, (I think?) these are all substitutions that are computable. We *could* implement the logic to make all these evaluate correctly if we wanted to. It's just a matter of how much complexity we want to allow in typing.py (or in the runti

[issue47097] Document PEP 646

2022-03-24 Thread Matthew Rahtz
Matthew Rahtz added the comment: Ooh, thanks for the reminder! I'll start drafting this now. -- nosy: +matthew.rahtz ___ Python tracker <https://bugs.python.org/is

[issue47097] Document PEP 646

2022-03-24 Thread Matthew Rahtz
Change by Matthew Rahtz : -- keywords: +patch pull_requests: +30183 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/32103 ___ Python tracker <https://bugs.python.org/issu

<    1   2   3   4   5   6   7   8   9   >