[issue47203] ImportError: DLL load failed while importing binascii: %1 is not a valid Win32 application.

2022-04-04 Thread Matthew
Matthew added the comment: Hello, Thanks for all the help people have given me! I've found the solution to my problem. The Environment Variable was set below every other, leading to a different Python interpreter to being used, which was probably bundled with a different software. I

[issue47203] ImportError: DLL load failed while importing binascii: %1 is not a valid Win32 application.

2022-04-05 Thread Matthew
Matthew added the comment: > Probably there was also shadowing involved, since the built-in module doesn't > try to load anything else. Would be nice to know for sure (@Matthew) to make > sure we don't have some other issue here, but you're right, I don't see

[issue39116] StreamReader.readexactly() raises GeneratorExit on ProactorEventLoop

2020-11-28 Thread Matthew
Matthew added the comment: Let me preface this by declaring that I am very new to Python async so it is very possible that I am missing something seemingly obvious. That being said, I've been looking at various resources to try to understand the internals of asyncio and it hasn't

[issue36893] email.headerregistry.Address blocks Unicode local part addr_spec accepted elsewhere

2019-05-12 Thread Matthew
New submission from Matthew : The parser for passing an addr_spec to email.headerregistry.Address does not allow non-ASCII local parts, but the rest of the email package handles them fine, either straight (with explicit references to RFC6532 and SMTPUTF8), or encoding as expected. Apologies

[issue6676] expat parser throws Memory Error when parsing multiple files

2009-08-10 Thread Matthew
New submission from Matthew : I'm using the Expat python interface to parse multiple XML files in an application and have found that it throws a "Memory Error" exception if multiple calls are made to xmlparser.ParseFile(file) on the same xmlparser object. This occurs even

[issue6676] expat parser throws Memory Error when parsing multiple files

2009-08-10 Thread Matthew
Matthew added the comment: This also occurs with Python 2.5.1 on OS X -- ___ Python tracker <http://bugs.python.org/issue6676> ___ ___ Python-bugs-list mailin

[issue6113] Dupicate instances of classes in list

2009-05-26 Thread Matthew
New submission from Matthew : What I intended was... I create a list of DIFFERENT instances of the same class, I wanted them to be different instances, with different values for the properties, stressing the word "DIFFERENT". What I originally did was... The __init__ assigns default

[issue6113] Dupicate instances of classes in list

2009-05-26 Thread Matthew
Matthew added the comment: I didn't keep a copy of the code that didn't work. Sorry. When I changed the way I was initialising the classes, before adding them to the list, I didn't change any of the logical flow in my code, and it started to work. I know it sounds very s

[issue6113] Dupicate instances of classes in list

2009-05-26 Thread Matthew
Matthew added the comment: Trust me this was no typo. I debugged my code by adding print statements to see what values were going into the list, and print statements to see the values that were coming out. It might be that running code from the application Blender does bazaar things, or it

[issue6113] Dupicate instances of classes in list

2009-05-26 Thread Matthew
Matthew added the comment: First File This is the main one, it's the one that is called from the Blender application. -- Added file: http://bugs.python.org/file14074/MyWalls.py ___ Python tracker <http://bugs.python.org/i

[issue6113] Dupicate instances of classes in list

2009-05-26 Thread Matthew
Matthew added the comment: Second file The loads of code for building a wall -- Added file: http://bugs.python.org/file14075/WallWithDoors.py ___ Python tracker <http://bugs.python.org/issue6

[issue6113] Dupicate instances of classes in list

2009-05-26 Thread Matthew
Matthew added the comment: Third file... all the classes for holding the data -- Added file: http://bugs.python.org/file14076/modDataObjects.py ___ Python tracker <http://bugs.python.org/issue6

[issue6113] Dupicate instances of classes in list

2009-05-26 Thread Matthew
Matthew added the comment: Forth and final file... Just a little error handling and stuff I want all my classes to inherit -- Added file: http://bugs.python.org/file14077/modBasics.py ___ Python tracker <http://bugs.python.org/issue6

[issue6113] Dupicate instances of classes in list

2009-05-26 Thread Matthew
Matthew added the comment: If you want to run it I'm afraid you'll have to: 1) install Blender (www.blender.org) 2) put all those files in C:\Program Files\Blender Foundation\Blender\.blender\scripts\MyWalls\src\ 3) in the Blender application goto scripts ---> Objects ---> B

[issue6113] Dupicate instances of classes in list

2009-05-26 Thread Matthew
Matthew added the comment: So why is it able to create instances and add them to the lstFeatureVariables list, surely it should go wrong there and not allow the instances to be created. -- ___ Python tracker <http://bugs.python.org/issue6

[issue6113] Dupicate instances of classes in list

2009-05-26 Thread Matthew
Matthew added the comment: OK, sorry for the rambling, just ignore it Cheers... -- ___ Python tracker <http://bugs.python.org/issue6113> ___ ___ Pytho

[issue6113] Dupicate instances of classes in list

2009-05-26 Thread Matthew
Changes by Matthew : Removed file: http://bugs.python.org/file14074/MyWalls.py ___ Python tracker <http://bugs.python.org/issue6113> ___ ___ Python-bugs-list mailin

[issue6113] Dupicate instances of classes in list

2009-05-26 Thread Matthew
Changes by Matthew : Removed file: http://bugs.python.org/file14075/WallWithDoors.py ___ Python tracker <http://bugs.python.org/issue6113> ___ ___ Python-bugs-list mailin

[issue6113] Dupicate instances of classes in list

2009-05-26 Thread Matthew
Changes by Matthew : Removed file: http://bugs.python.org/file14076/modDataObjects.py ___ Python tracker <http://bugs.python.org/issue6113> ___ ___ Python-bugs-list mailin

[issue6113] Dupicate instances of classes in list

2009-05-26 Thread Matthew
Changes by Matthew : Removed file: http://bugs.python.org/file14077/modBasics.py ___ Python tracker <http://bugs.python.org/issue6113> ___ ___ Python-bugs-list mailin

[issue43224] Add support for PEP 646

2022-01-04 Thread Matthew Rahtz
Change by Matthew Rahtz : -- components: +Parser, Tests nosy: +lys.nikolaou, pablogsal title: Add support for PEP 646 (Variadic Generics) to typing.py -> Add support for PEP 646 versions: +Python 3.11 -Python 3.10 ___ Python tracker <

[issue43224] Add support for PEP 646

2022-01-04 Thread Matthew Rahtz
Change by Matthew Rahtz : -- pull_requests: +28607 pull_request: https://github.com/python/cpython/pull/30398 ___ Python tracker <https://bugs.python.org/issue43

[issue46410] TypeError when parsing regexp with unicode named character sequence escape

2022-01-18 Thread Matthew Barnett
Matthew Barnett added the comment: They're not supported in string literals either: Python 3.10.1 (tags/v3.10.1:2cd268a, Dec 6 2021, 19:10:37) [MSC v.1929 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more inf

[issue46515] Benefits Of Phool Makhana

2022-01-25 Thread Matthew Barnett
Change by Matthew Barnett : -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue46515> ___ ___ Python-bugs-list

[issue43224] Add support for PEP 646

2022-01-30 Thread Matthew Rahtz
Change by Matthew Rahtz : -- pull_requests: +29199 pull_request: https://github.com/python/cpython/pull/31018 ___ Python tracker <https://bugs.python.org/issue43

[issue43224] Add support for PEP 646

2022-01-30 Thread Matthew Rahtz
Change by Matthew Rahtz : -- pull_requests: +29200 pull_request: https://github.com/python/cpython/pull/31019 ___ Python tracker <https://bugs.python.org/issue43

[issue43224] Add support for PEP 646

2022-01-30 Thread Matthew Rahtz
Change by Matthew Rahtz : -- pull_requests: +29202 pull_request: https://github.com/python/cpython/pull/31021 ___ Python tracker <https://bugs.python.org/issue43

[issue46589] Improve documentation for typing._GenericAlias

2022-01-30 Thread Matthew Rahtz
New submission from Matthew Rahtz : There's currently not much documentation in `typing.py` for `_GenericAlias`. Some fairly weird things go on in there, so it would be great to have more info in the class about what's going on and why various edge cases are necessary. --

[issue42369] Reading ZipFile not thread-safe

2022-02-01 Thread Matthew Davis
Matthew Davis added the comment: In addition to fixing any unexpected behavior, can we update the documentation [1] to state what the expected behavior is in terms of thread safety? [1] https://docs.python.org/3/library/zipfile.html -- nosy: +mdavis-xyz

[issue46617] CSV Creation occasional off by one error

2022-02-02 Thread Matthew Stidham
New submission from Matthew Stidham : The file which I found the error in is in https://github.com/greearb/lanforge-scripts -- components: C API files: debug from pandas failure.txt messages: 412400 nosy: matthewstidham priority: normal severity: normal status: open title: CSV

[issue46617] CSV Creation occasional off by one error

2022-02-02 Thread Matthew Stidham
Matthew Stidham added the comment: the problem was a file in our library screwing up the python configuration -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/i

[issue43478] Disallow Mock spec arguments from being Mocks

2022-02-02 Thread Matthew Suozzo
Change by Matthew Suozzo : -- pull_requests: +29275 pull_request: https://github.com/python/cpython/pull/31090 ___ Python tracker <https://bugs.python.org/issue43

[issue46627] Regex hangs indefinitely

2022-02-03 Thread Matthew Barnett
Matthew Barnett added the comment: That pattern has: (?P[^]]+)+ Is that intentional? It looks wrong to me. -- ___ Python tracker <https://bugs.python.org/issue46

[issue46825] slow matching on regular expression

2022-02-22 Thread Matthew Barnett
Matthew Barnett added the comment: The expression is a repeated alternative where the first alternative is a repeat. Repeated repeats can result in a lot of attempts and backtracking and should be avoided. Try this instead: (0|1(01*0)*1

[issue1077] itertools missing, causes interactive help to break

2007-08-31 Thread Matthew Russell
Changes by Matthew Russell: -- components: Interpreter Core, Library (Lib) files: py3k_bug1.txt severity: urgent status: open title: itertools missing, causes interactive help to break type: behavior versions: Python 3.0 __ Tracker <[EMAIL PROTEC

[issue1269] Exception in pstats print_callers()

2007-11-21 Thread Matthew Fremont
Matthew Fremont added the comment: I hit the same issue, and I think the problem is that at line 515 in pstats.py add_callers() the two stats instead of adding them member-wise. As a result, each time add() is called, the number of stats associated with each func grows by 4. Then, when

[issue12984] XML NamedNodeMap ( attribName in NamedNodeMap fails )

2011-09-14 Thread Matthew Newcomb
New submission from Matthew Newcomb : I was cleaning up some old code to make it pep8 compliant and came across this bug. Switching from 'has_key' to 'in' does not work with a xml.dom.minidom.NamedNodeMap. An easy solution appears to be to add a '__contains_

[issue13169] Regular expressions with 0 to 65536 repetitions raises OverflowError

2011-10-13 Thread Matthew Barnett
Matthew Barnett added the comment: The quantifiers use 65535 to represent no upper limit, so ".{0,65535}" is equivalent to ".*". For example: >>> re.match(".*", "x" * 10).span() (0, 10) >>> re.match(".{0,65535}", &

[issue13169] Regular expressions with 0 to 65536 repetitions raises OverflowError

2011-10-14 Thread Matthew Barnett
Matthew Barnett added the comment: The limit is an implementation detail. The pattern is compiled into codes which are then interpreted, and it just happens that the codes are (usually) 16 bits, giving a range of 0..65535, but it uses 65535 to represent no limit and doesn't warn i

[issue13475] Add '-p'/'--path0' command line option to override sys.path[0] initialisation

2011-11-27 Thread Matthew Woodcraft
Matthew Woodcraft added the comment: The proposed --nopath0 option is something I've wished I had in the past. If this is added, it would be good if it could be given a single-letter form too, because it's an option that would be useful in #! lines (they don't reliably sup

[issue13592] repr(regex) doesn't include actual regex

2011-12-13 Thread Matthew Barnett
Matthew Barnett added the comment: In reply to Ezio, the repr of a large string, list, tuple or dict is also long. The repr of a compiled regex should probably also show the flags, but should it just be the numeric value? -- ___ Python tracker

[issue13592] repr(regex) doesn't include actual regex

2011-12-13 Thread Matthew Barnett
Matthew Barnett added the comment: Actually, one possibility that occurs to me is to provide the flags within the pattern. The .pattern attribute gives the original pattern, but repr could give the flags in-line at the start of the pattern: >>> # Assuming Python 3. >>>

[issue13592] repr(regex) doesn't include actual regex

2011-12-22 Thread Matthew Barnett
Matthew Barnett added the comment: I'm just adding this to the regex module and I've come up against a possible issue. The regex module supports named lists, which could be very big. Should the entire contents of those lists also be shown in the repr?They would have to be if the

[issue13652] Creating lambda functions in a loop has unexpected results when resolving variables used as arguments

2011-12-22 Thread Matthew Barnett
Matthew Barnett added the comment: That's not a bug. This might help to explain what's going on: What do (lambda) function closures capture in Python? http://stackoverflow.com/questions/2295290/what-do-lambda-function-closures-capture-in-python -- nosy: +

[issue12177] re.match raises MemoryError

2011-05-25 Thread Matthew Barnett
Matthew Barnett added the comment: This also raises MemoryError: re.match(r'()*?1', 'a1') but none of these do: re.match(r'()+1', 'a1') re.match(r'()*1', 'a1') -- nosy: +mrabarnett ___

[issue12177] re.match raises MemoryError

2011-05-28 Thread Matthew Boehm
Matthew Boehm added the comment: Here are some windows results with Python 2.7: >>> import re >>> re.match("()*?1", "1") <_sre.SRE_Match object at 0x025C0E60> >>> re.match("()+?1", "1") >>> re.ma

[issue12280] If statement

2011-06-07 Thread Matthew Brunt
New submission from Matthew Brunt : i'm very new to python (currently going through a python for beginners book at work to pass the time), and i'm having trouble with an if statement exercise. basically, i'm creating a very simple password program that displays "Access

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

2011-07-11 Thread Matthew Barnett
Matthew Barnett added the comment: The new regex imlementation is hosted here: https://code.google.com/p/mrab-regex-hg/ The span of m['a_thing'] is m.span('a_thing'), if that helps. The named groups are listed on the pattern object, which can be accessed via m.re: >

[issue12671] urlopen returning empty string

2011-07-31 Thread Matthew Barnett
New submission from Matthew Barnett : Someone over at StackOverflow had a problem with urlopen in Python 3.2.1: http://stackoverflow.com/questions/6892573/problem-with-urlopen/6892843#6892843 This is the code: from urllib.request import urlopen f = urlopen('http://online.ws

[issue12671] urlopen returning empty string

2011-07-31 Thread Matthew Barnett
Matthew Barnett added the comment: Just been told this bug has already been reported as issue #12576. -- resolution: -> duplicate ___ Python tracker <http://bugs.python.org/issu

[issue12671] urlopen returning empty string

2011-07-31 Thread Matthew Barnett
Changes by Matthew Barnett : -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue12671> ___ ___ Python-bugs-list mailing list Unsubscri

[issue12723] tkSimpleDialog.askstring shouldn't allow empty string input

2011-08-10 Thread Matthew Hemke
New submission from Matthew Hemke : tkSimpleDialog.askstring allows empty input. The attached patch adds validation to the input to ensure it is not empty. -- components: Tkinter files: askstring.patch keywords: patch messages: 141868 nosy: rabbidous priority: normal severity: normal

[issue12723] tkSimpleDialog.askstring shouldn't allow empty string input

2011-08-10 Thread Matthew Hemke
Changes by Matthew Hemke : -- versions: +Python 2.7 ___ Python tracker <http://bugs.python.org/issue12723> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12723] tkSimpleDialog.askstring shouldn't allow empty string input

2011-08-11 Thread Matthew Hemke
Matthew Hemke added the comment: What about adding a validatecommand option like on Tkinter.Entry? For what I am trying to do it was sort of a kludge to validate the entry because an empty string was invalid, but in the interface design, it would have been "rude" to validate after

[issue12723] Provide an API in tkSimpleDialog for defining custom validation functions

2011-08-12 Thread Matthew Hemke
Matthew Hemke added the comment: I'm not sure if I misunderstood you, or you misunderstood me, but adding an option to the askstring dialog that would take a function handle would also allow you to use it for things other than strings (ints,etc.) Tkinter Entry does this: you se

[issue12728] Python re lib fails case insensitive matches on Unicode data

2011-08-12 Thread Matthew Barnett
Changes by Matthew Barnett : -- nosy: +mrabarnett ___ Python tracker <http://bugs.python.org/issue12728> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12729] Python lib re cannot handle Unicode properly due to narrow/wide bug

2011-08-12 Thread Matthew Barnett
Changes by Matthew Barnett : -- nosy: +mrabarnett ___ Python tracker <http://bugs.python.org/issue12729> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12730] Python's casemapping functions are untrustworthy due to narrow/wide build issues

2011-08-12 Thread Matthew Barnett
Changes by Matthew Barnett : -- nosy: +mrabarnett ___ Python tracker <http://bugs.python.org/issue12730> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12731] python lib re uses obsolete sense of \w in full violation of UTS#18 RL1.2a

2011-08-12 Thread Matthew Barnett
Changes by Matthew Barnett : -- nosy: +mrabarnett ___ Python tracker <http://bugs.python.org/issue12731> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12732] Can't portably use Unicode in Python identifiers

2011-08-12 Thread Matthew Barnett
Changes by Matthew Barnett : -- nosy: +mrabarnett ___ Python tracker <http://bugs.python.org/issue12732> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12733] Request for grapheme support in Python re lib

2011-08-12 Thread Matthew Barnett
Changes by Matthew Barnett : -- nosy: +mrabarnett ___ Python tracker <http://bugs.python.org/issue12733> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12734] Request for property support in Python re lib

2011-08-12 Thread Matthew Barnett
Changes by Matthew Barnett : -- nosy: +mrabarnett ___ Python tracker <http://bugs.python.org/issue12734> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12735] request full Unicode collation support in std python library

2011-08-12 Thread Matthew Barnett
Changes by Matthew Barnett : -- nosy: +mrabarnett ___ Python tracker <http://bugs.python.org/issue12735> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12736] Request for python casemapping functions to use full not simple casemaps per Unicode's recommendation

2011-08-12 Thread Matthew Barnett
Changes by Matthew Barnett : -- nosy: +mrabarnett ___ Python tracker <http://bugs.python.org/issue12736> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12729] Python lib re cannot handle Unicode properly due to narrow/wide bug

2011-08-12 Thread Matthew Barnett
Matthew Barnett added the comment: In a narrow build, a codepoint in the astral plane is encoded as surrogate pair. I could implement a workaround for it in the regex module, but I think that the proper place to fix it is in the language as a whole, perhaps by implementing PEP 393 ("Fle

[issue12729] Python lib re cannot handle Unicode properly due to narrow/wide bug

2011-08-13 Thread Matthew Barnett
Matthew Barnett added the comment: There are occasions when you want to do string slicing, often of the form: pos = my_str.index(x) endpos = my_str.index(y) substring = my_str[pos : endpos] To me that suggests that if UTF-8 is used then it may be worth profiling to see whether caching the

[issue12729] Python lib re cannot handle Unicode properly due to narrow/wide bug

2011-08-13 Thread Matthew Barnett
Matthew Barnett added the comment: You're right about starting the second search from where the first finished. Caching the position would be an advantage there. The memory cost of extra pointers wouldn't be so bad if UTF-8 took less space than the current format. Regex isn'

[issue12749] lib re cannot match non-BMP ranges (all versions, all builds)

2011-08-14 Thread Matthew Barnett
Matthew Barnett added the comment: On a narrow build, "\N{MATHEMATICAL SCRIPT CAPITAL A}" is stored as 2 code units, and neither re nor regex recombine them when compiling a regex or looking for a match. regex supports \xNN, \u and \U and \N{XYZ} itself, so they can be

[issue12729] Python lib re cannot handle Unicode properly due to narrow/wide bug

2011-08-14 Thread Matthew Barnett
Matthew Barnett added the comment: Have a look here: http://98.245.80.27/tcpc/OSCON2011/gbu/index.html -- ___ Python tracker <http://bugs.python.org/issue12

[issue12729] Python lib re cannot handle Unicode properly due to narrow/wide bug

2011-08-15 Thread Matthew Barnett
Matthew Barnett added the comment: For what it's worth, I've had idea about string storage, roughly based on how *nix stores data on disk. If a string is small, point to a block of codepoints. If a string is medium-sized, point to a block of pointers to codepoint blocks. If a

[issue7105] weak dict iterators are fragile because of unpredictable GC runs

2011-08-18 Thread Matthew Schwickerath
Matthew Schwickerath added the comment: Any plans on actually patching this in 2.7 any time soon? This is affecting our software and hanging it on random occasions. -- nosy: +qelan ___ Python tracker <http://bugs.python.org/issue7

[issue12753] \N{...} neglects formal aliases and named sequences from Unicode charnames namespace

2011-08-19 Thread Matthew Barnett
Matthew Barnett added the comment: For the "Line_Break" property, one of the possible values is "Inseparable", with 2 permitted aliases, the shorter "IN" (which is reasonable) and "Inseperable" (ouch!). -- _

[issue12789] re.Scanner don't support more then 2 groups on regex

2011-08-20 Thread Matthew Barnett
Matthew Barnett added the comment: Even if this bug is fixed, it still won't work as you expect, and this s why. The Scanner function accepts a list of 2-tuples. The first item of the tuple is a regex and the second is a function. For example: re.Scanner([(r"\d+", number)

[issue12736] Request for python casemapping functions to use full not simple casemaps per Unicode's recommendation

2011-08-27 Thread Matthew Barnett
Matthew Barnett added the comment: There are some oddities in Unicode case-folding. Under full case-folding, both "\N{LATIN CAPITAL LETTER SHARP S}" and "\N{LATIN SMALL LETTER SHARP S}" fold to "ss", which means that those codepoints match each other. Howe

[issue12736] Request for python casemapping functions to use full not simple casemaps per Unicode's recommendation

2011-08-28 Thread Matthew Barnett
Matthew Barnett added the comment: The regex module currently uses simple case-folding, although I'm working towards full case-folding, as listed in http://www.unicode.org/Public/UNIDATA/CaseFolding.txt. -- ___ Python tracker

[issue12855] open() and codecs.open() treat form-feed differently

2011-08-29 Thread Matthew Boehm
New submission from Matthew Boehm : A file opened with codecs.open() splits on a form feed character (\x0c) while a file opened with open() does not. >>> with open("formfeed.txt", "w") as f: ... f.write("line \fone\nline two\n") ... >>> with

[issue12855] open() and codecs.open() treat form-feed differently

2011-08-29 Thread Matthew Boehm
Matthew Boehm added the comment: Thanks for explaining the reasoning. Perhaps I should add this to the python wiki (http://wiki.python.org/moin/Unicode) ? It would be nice if it fit in the docs somewhere, but I'm not sure where. I'm curious how (or if) 2to3 would handle this as

[issue12855] open() and codecs.open() treat form-feed differently

2011-08-29 Thread Matthew Boehm
Changes by Matthew Boehm : -- resolution: -> wont fix status: open -> closed ___ Python tracker <http://bugs.python.org/issue12855> ___ ___ Python-bugs-

[issue12855] open() and codecs.open() treat form-feed differently

2011-08-29 Thread Matthew Boehm
Matthew Boehm added the comment: I'll suggest a patch for the documentation when I get to my home computer in an hour or two. -- assignee: -> docs@python components: +Documentation -Interpreter Core nosy: +docs@python resolution: wont fix -> status: clo

[issue12855] open() and codecs.open() treat form-feed differently

2011-08-29 Thread Matthew Boehm
Matthew Boehm added the comment: I'm taking a look at the docs now. I'm considering adding a table/list of characters python treats as newlines, but it seems like this might fit better as a note in http://docs.python.org/library/stdtypes.html#str.splitlines or somewhere else i

[issue12855] linebreak sequences should be better documented

2011-08-29 Thread Matthew Boehm
Matthew Boehm added the comment: I've attached a patch for python2.7 that adds a small not to library/stdtypes.html#str.splitlines explaining which sequences are treated as line breaks: """ Note: Python recognizes "\r", "\n", and "\r\n" as

[issue12855] linebreak sequences should be better documented

2011-08-30 Thread Matthew Boehm
Matthew Boehm added the comment: I can fix the patch to list all the unicode line boundaries. The three places I've considered putting it are: 1. On the howto/unicode.html 2. Somewhere in the stdtypes.html#typesseq description (maybe with other notes at the bottom) 3. As a note t

[issue12855] linebreak sequences should be better documented

2011-08-30 Thread Matthew Boehm
Matthew Boehm added the comment: I've attached a patch for 2.7 and will attach one for 3.2 in a minute. I built the docs for both 2.7 and 3.2 and verified that there were no warnings and that the resulting web pages looked okay. Things to consider: * Placement of unicode.splitlines() m

[issue12855] linebreak sequences should be better documented

2011-08-30 Thread Matthew Boehm
Changes by Matthew Boehm : Added file: http://bugs.python.org/file23077/linebreakdoc.v2.py32.patch ___ Python tracker <http://bugs.python.org/issue12855> ___ ___ Pytho

[issue2636] Adding a new regex module (compatible with re)

2011-09-01 Thread Matthew Barnett
Matthew Barnett added the comment: The regex module supports nested sets and set operations, eg. r"[[a-z]--[aeiou]]" (the letters from 'a' to 'z', except the vowels). This means that literal '[' in a set needs to be escaped. For example, re module s

[issue2636] Adding a new regex module (compatible with re)

2011-09-01 Thread Matthew Barnett
Matthew Barnett added the comment: I think I need a show of hands. Should the default be old behaviour (like re) or new behaviour? (It might be old now, new later.) Should there be a NEW flag (as at present), or an OLD flag, or a VERSION parameter (0=old, 1=new, 2

[issue2636] Adding a new regex module (compatible with re)

2011-09-02 Thread Matthew Barnett
Matthew Barnett added the comment: The least disruptive change would be to have a NEW flag for the new behaviour, as at present, and an OLD flag for the old behaviour. Currently the default is old behaviour, but in the future it will be new behaviour. The differences would be: Old

[issue2636] Adding a new regex module (compatible with re)

2011-09-02 Thread Matthew Barnett
Matthew Barnett added the comment: So, VERSION0 and VERSION1, with "(?V0)" and "(?V1)" in the pattern? -- ___ Python tracker <http://bu

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

2010-08-11 Thread Matthew Barnett
Matthew Barnett added the comment: I agree with Kamil and Germán. I would've expected negative indexes for sequences to work. Negative indexes for fields is a different matter. -- ___ Python tracker <http://bugs.python.org/i

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

2010-08-14 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-20100814.zip is a new version of the regex module. I've added default Unicode word boundaries and renamed the Pattern and Match classes. Over to you, Alex. :-) -- Added file: http://bugs.python.org/file18532/issue2636-2010081

[issue7255] "Default" word boundaries for Unicode data?

2010-08-14 Thread Matthew Barnett
Matthew Barnett added the comment: These have been added to the new 'regex' module. See issue #2636 or PyPI at: http://pypi.python.org/pypi/regex -- nosy: +mrabarnett ___ Python tracker <http://bugs.python.

[issue7255] "Default" word boundaries for Unicode data?

2010-08-15 Thread Matthew Barnett
Matthew Barnett added the comment: If you're on Windows (x86, 32-bit) then compilation isn't necessary - just use the appropriate _regex.pyd. -- ___ Python tracker <http://bugs.python.

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

2010-08-15 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-20100816.zip is a new version of the regex module. Unfortunately I came across a bug in the handing of sets. More unit tests added. -- Added file: http://bugs.python.org/file18541/issue2636-20100816.zip

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

2010-08-23 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-20100824.zip is a new version of the regex module. More speedups. Getting towards Perl speed now, depending on the regex. :-) -- Added file: http://bugs.python.org/file18621/issue2636-20100824.zip

[issue9802] Document 'stability' of builtin min() and max()

2010-09-08 Thread Matthew Woodcraft
New submission from Matthew Woodcraft : In CPython, the builtin max() and min() have the property that if there are items with equal keys, the first item is returned. From a quick look at their source, I think this is true for Jython and IronPython too. I propose making this a documented

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

2010-09-11 Thread Matthew Barnett
Matthew Barnett added the comment: issue2636-20100912.zip is a new version of the regex module. More speedups. I've been comparing the speed against Perl wherever possible. In some cases Perl is lightning fast, probably because regex is built into the language and it doesn't hav

[issue9802] Document 'stability' of builtin min() and max()

2010-09-12 Thread Matthew Woodcraft
Matthew Woodcraft added the comment: > (1) Shouldn't 'reverse=True' be omitted in the second doc > addition? Yes, of course, sorry. > (2) I'd also suggest adding a brief comment about what this > means for distinct, but equal, objects; otherwise it's not &

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

2010-09-12 Thread Matthew Barnett
Matthew Barnett added the comment: Another flag? Hmm. How about this instead: if a scoped flag appears at the end of a regex (and would therefore normally have no effect) then it's treated as though it's at the start of the regex. Thus: foo(?i) is treated like:

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

2010-09-12 Thread Matthew Barnett
Matthew Barnett added the comment: The tests for re include these regexes: a.b(?s) a.*(?s)b I understand what Georg said previously about some people preferring to put them at the end, but I personally wouldn't do that because some regex implementations support scoped inline

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

2010-09-12 Thread Matthew Barnett
Matthew Barnett added the comment: OK, so would it be OK if there was, say, a NEW (N) flag which made the inline flags (?flags) scoped and allowed splitting on zero-width matches? -- ___ Python tracker <http://bugs.python.org/issue2

  1   2   3   4   5   6   7   8   9   >