[issue16398] deque.rotate() could be much faster

2013-02-02 Thread Simon Law
Simon Law added the comment: Raymond, looking at your patch, can we assert that deque->leftblock is never equal to deque->rightblock? If not, you need to use memmove() instead of memcpy(), which is unsafe for overlapping arrays. It is not clear to me that this invariant is true. At th

[issue9974] tokenizer.untokenize not invariant with line continuations

2012-12-03 Thread Simon Law
Changes by Simon Law : -- nosy: +sfllaw ___ Python tracker <http://bugs.python.org/issue9974> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue16398] deque.rotate() could be much faster

2012-11-03 Thread Simon Law
New submission from Simon Law: If you look at the implementation of deque.rotate(), it does the equivalent of deque.append(deque.popleft()) or deque.appendleft(deque.pop()). Unfortunately, for larger rotations, the pop() and append() calls just do too much work. Since the documentation

[issue15125] argparse: positional arguments containing - in name not handled well

2012-11-03 Thread Simon Law
Simon Law added the comment: 15125-2.patch applies to the default branch. It makes dest behave the same for positional and optional arguments in terms of name mangling. Also, there is a backward-compatibility path in Namespace to support old-style getattr() access. However, it'

[issue15125] argparse: positional arguments containing - in name not handled well

2012-11-03 Thread Simon Law
Simon Law added the comment: Note that 15125-1.patch applies to Python 2.7 cleanly as it is a bugfix. -- ___ Python tracker <http://bugs.python.org/issue15

[issue15125] argparse: positional arguments containing - in name not handled well

2012-11-03 Thread Simon Law
Simon Law added the comment: Sorry, there was a small typo in the previous patch. Here's the newer version. -- Added file: http://bugs.python.org/file27860/15125-1.patch ___ Python tracker <http://bugs.python.org/is

[issue15125] argparse: positional arguments containing - in name not handled well

2012-11-03 Thread Simon Law
Simon Law added the comment: >> But patching the module to allow explicitly setting dest via keyword >> argument shouldn't hurt anybody. > > I agree that it wouldn't hurt anybody. If you can find a way to do > this, feel free to provide a patch. > > However,

[issue16395] Documentation claims that PySequence_Fast returns a tuple, when it actually returns a list.

2012-11-03 Thread Simon Law
Simon Law added the comment: It looks like this was caught in the 3.3 branch, but only fixed it in the comment: changeset: 75448:d8f68195210e user:Larry Hastings date:Mon Mar 05 22:59:13 2012 -0800 summary: Fix a comment: PySequence_Fast() creates a list, not a tuple

[issue16395] Documentation claims that PySequence_Fast returns a tuple, when it actually returns a list.

2012-11-03 Thread Simon Law
New submission from Simon Law: The documentation in Python 2.7, 3.2, and 3.3 claim that: PyObject* PySequence_Fast(PyObject *o, const char *m) Return value: New reference. Returns the sequence o as a tuple, unless it is already a tuple or list, in which case o is returned... Unfortunately

[issue444582] Finding programs in PATH, adding shutil.which

2011-08-08 Thread Simon Law
Changes by Simon Law : -- nosy: +sfllaw ___ Python tracker <http://bugs.python.org/issue444582> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1697175] winreg module for cygwin?

2009-04-06 Thread Simon Law
Simon Law added the comment: zooko: You may be interested in http://pypi.python.org/pypi/cygwinreg/ -- nosy: +sfllaw ___ Python tracker <http://bugs.python.org/issue1697