Matthew Barnett added the comment:
Not quite all. POSIX regexes will always look for the longest match, so the
order of the alternatives doesn't matter, i.e. x|xy would give the same result
as xy|x.
--
___
Python tracker
<http://bugs.py
Matthew Barnett added the comment:
The problem is with the "(\w+\s*)+". \s* can match an empty string, so when
matching a word it's like "(\w+)+".
If you have n letters, there are 2**n ways it could match, and if what follows
never matches, it'll try all of them.
Matthew Gamble added the comment:
Hi,
I've recently been working on a Python module for the Adobe universal container
format (UCF) which extends the zip specification - as part of this I wanted to
be able to remove and rename files in an archive.
I discovered this issue when writin
Changes by Matthew Gamble :
Added file: http://bugs.python.org/file38879/zip_hiddenfiles.zip
___
Python tracker
<http://bugs.python.org/issue6818>
___
___
Python-bug
Matthew Barnett added the comment:
The 4th argument of re.sub is the maximum count (0 means unlimited).
>>> help(re.sub)
Help on function sub in module re:
sub(pattern, repl, string, count=0, flags=0)
Return the string obtained by replacing the leftmost
non-overlapping occur
New submission from Matthew Wedgwood:
On Darwin, os.mkdir('/') raises IsADirectory. On Linux, the same call raises
FileExistsError. The implementation for os.makedirs() in Python 3.2+ checks
only for the latter when evaluating the exists_ok parameter. This causes
os.makedirs(
Matthew Barnett added the comment:
FTR, in "_odict_resize" there's this:
size_t i = _odict_get_index(od, _odictnode_KEY(node));
if (i < 0) {
Note that "i" is declared as unsigned and then tested whether it's negati
Matthew Barnett added the comment:
In "odict_new", if "_odict_initialize" fails, will the dict pointed to by
"od_inst_dict" be deallocated?
In "odictiter_new", there's "Py_INCREF(od);".
Matthew Barnett added the comment:
First some background: when you put a new entry into a dict, it looks for an
empty slot, the key's hash determining the initial choice, but if that slot's
occupied, it picks another, etc, so the key might not be in the slot of first
c
Matthew Jacobi added the comment:
Is there a workaround for this for people on python2?
Would installing https://pypi.python.org/pypi/email/6.0.0a1 fix it?
> testing release of email6
> This is a standalone version of the version of email package that will ship
> with Python
Matthew Barnett added the comment:
@Tim: Why are you using re.search with '^'? Does the pattern that's passed in
ever contain '(?m)'? If not, re.match without '^' is better.
--
___
Python tracker
Matthew Barnett added the comment:
I downloaded Python 3.6.0b1 not long after it was released and it works for me:
>>> re.match('(?i:CaseInsensitive)', 'caseinsensitive')
<_sre.SRE_Match object; span=(0, 15), match='caseinsensitive'>
--
_
Matthew Barnett added the comment:
I'd prefer an explicit suppression to changing a long-standing behaviour.
--
___
Python tracker
<http://bugs.python.org/is
Matthew Barnett added the comment:
@Sworddragon: Your post says that it should be more generic or complete the
list, but it doesn't make a suggestion as to what it should _actually_ say.
Example: "Compile a regular expression pattern into a regular expression
object, which can b
Matthew Barnett added the comment:
I split the file into sections, each containing no more 1000 lines, and tried
reading each section. Attached is a zip file of those that didn't return the
expected number of rows.
The problem appears to be due to unclosed quotes, which cause following
Matthew Barnett added the comment:
I hope you make it clear what you mean by 'equal', i.e. that it's comparing the
pattern and the flags (AFAICT), so re.compile('(?x)a') != re.compile('(?x) a ').
--
___
Pyth
Matthew Barnett added the comment:
@Barry: repl already supports some escapes, e.g. \g for named groups,
although not \xXX et al, so deprecating unknown escapes like in the pattern
makes sense to me.
BTW, the regex module already supports \xXX, \N{XXX}, etc
New submission from Matthew H. McKenzie :
A mailbox (folder) need not be for a recipient and need not be the private part
of an RFC2822 address.
Passing a value of "000 Bookings" to select() results in validation issues when
the tokens are parsed as arguments and there are too
Matthew Leon Grinshpun added the comment:
I should be able to do this in November. For the moment I'm a bit busy.
--
___
Python tracker
<http://bugs.python.org/i
New submission from Matthew M. Boedicker :
I am working with a web server that does not quote the realm in the
WWW-Authenticate header.
This patch will make the realm parsing handle unquoted realm as well as some
other invalid variations.
I tried doing it by modifying the regex only but
Changes by Matthew M. Boedicker :
--
type: -> behavior
___
Python tracker
<http://bugs.python.org/issue11153>
___
___
Python-bugs-list mailing list
Unsubscri
Change by Matthew Morrissette Vance :
--
nosy: +yinzara
___
Python tracker
<https://bugs.python.org/issue39658>
___
___
Python-bugs-list mailing list
Unsub
New submission from Matthew H. McKenzie :
Lib/ftplib.py function retrlines
Inspired by documentation the following writes a file without line-endings:
from ftplib import FTP
ftp=FTP()
ftp.connect('hostname')
ftp.login('user','')
ftp.sendcmd('pasv
Matthew H. McKenzie added the comment:
On the face of it it is my mistake for using the write method for my file. But
read on.
your write_line() adds an EOL, OK, because it wraps print().
So the retrlines() function strips them in anticipation?
The error is arguably in my own code as I
Matthew H. McKenzie added the comment:
To answer your original questions : Linux Host and Client, amd MVS (EBCDIC
records) to Linux.
hacks to overcome (in libftp):
def print_line(line):
'''Default retrlines callback to print a line.'''
print(line, end
New submission from Matthew Leon Grinshpun :
Multiprocessing's Pool class __init__ method is written in a way that
makes it very difficult for a subclass to modify self._taskqueue. There
are very good reasons for wanting to do this - ie, making the taskqueue
block when it reaches a certain
Matthew Leon Grinshpun added the comment:
I have attached a patch. All I did was shift the one line from __init__
to _setup_queues.
That's it.
You could take advantage of the change in the following way:
class BlockingPool(pool.Pool):
def _setup_queues(self):
pool
New submission from Matthew Ekstrand-Abueg:
Documentation states:
# product('ABCD', 'xy') --> Ax Ay Bx By Cx Cy Dx Dy
# product(range(2), repeat=3) --> 000 001 010 011 100 101 110
But:
>>> list(itertools.product('ABCD','xy'))
[(
801 - 828 of 828 matches
Mail list logo