Re: [Python-Dev] memcmp performance

2011-10-21 Thread Stefan Behnel
Antoine Pitrou, 20.10.2011 23:08: I have been doing some performance experiments with memcmp, and I was surprised that memcmp wasn't faster than it was in Python. I did a whole, long analysis and came up with some very simple results. Thanks for the analysis. Non-bugfix work now happens on

Re: [Python-Dev] [Python-checkins] cpython (3.2): adjust braces a bit

2011-10-21 Thread Eric V. Smith
What's the logic for adding some braces, but removing others? On 10/19/2011 4:58 PM, benjamin.peterson wrote: http://hg.python.org/cpython/rev/9c79a25f4a8b changeset: 73010:9c79a25f4a8b branch: 3.2 parent: 72998:99a9f0251924 user:Benjamin Peterson benja...@python.org

Re: [Python-Dev] memcmp performance

2011-10-21 Thread Antoine Pitrou
On Fri, 21 Oct 2011 08:24:44 +0200 Stefan Behnel stefan...@behnel.de wrote: Antoine Pitrou, 20.10.2011 23:08: I have been doing some performance experiments with memcmp, and I was surprised that memcmp wasn't faster than it was in Python. I did a whole, long analysis and came up with some

[Python-Dev] Summary of Python tracker Issues

2011-10-21 Thread Python tracker
ACTIVITY SUMMARY (2011-10-14 - 2011-10-21) Python tracker at http://bugs.python.org/ To view or respond to any of the issues listed below, click on the issue. Do NOT respond to this message. Issues counts and deltas: open3095 (+18) closed 21927 (+43) total 25022 (+61) Open issues

Re: [Python-Dev] [Python-checkins] cpython (3.2): adjust braces a bit

2011-10-21 Thread Benjamin Peterson
2011/10/21 Eric V. Smith e...@trueblade.com: What's the logic for adding some braces, but removing others? No braces if everything is a one-liner, otherwise braces everywhere. -- Regards, Benjamin ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] cpython (3.2): adjust braces a bit

2011-10-21 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/21/2011 12:31 PM, Benjamin Peterson wrote: 2011/10/21 Eric V. Smith e...@trueblade.com: What's the logic for adding some braces, but removing others? No braces if everything is a one-liner, otherwise braces everywhere. Hmm, PEP 7 doesn't

Re: [Python-Dev] cpython (3.2): adjust braces a bit

2011-10-21 Thread Barry Warsaw
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On Oct 21, 2011, at 12:40 PM, Tres Seaver wrote: Hmm, PEP 7 doesn't show any example of the one-liner exception. Given that it tends to promote errors, particularly among indentation-conditioned Python programmers (adding another statement at the

Re: [Python-Dev] cpython (3.2): adjust braces a bit

2011-10-21 Thread Ethan Furman
Tres Seaver wrote: On 10/21/2011 12:31 PM, Benjamin Peterson wrote: 2011/10/21 Eric V. Smith : What's the logic for adding some braces, but removing others? No braces if everything is a one-liner, otherwise braces everywhere. Hmm, PEP 7 doesn't show any example of the one-liner

Re: [Python-Dev] cpython (3.2): adjust braces a bit

2011-10-21 Thread Benjamin Peterson
2011/10/21 Tres Seaver tsea...@palladion.com: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/21/2011 12:31 PM, Benjamin Peterson wrote: 2011/10/21 Eric V. Smith e...@trueblade.com: What's the logic for adding some braces, but removing others? No braces if everything is a one-liner,

Re: [Python-Dev] cpython (3.2): adjust braces a bit

2011-10-21 Thread Benjamin Peterson
2011/10/21 Tres Seaver tsea...@palladion.com: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/21/2011 12:31 PM, Benjamin Peterson wrote: 2011/10/21 Eric V. Smith e...@trueblade.com: What's the logic for adding some braces, but removing others? No braces if everything is a one-liner,

Re: [Python-Dev] memcmp performance

2011-10-21 Thread Richard Saunders
Richard Saunders I have been doing some performance experiments with memcmp, and I was surprised that memcmp wasn't faster than it was in Python. I did a whole, long analysis and came up with some very simple results.Antoine Pitrou, 20.10.2011 23:08: Thanks for the analysis. Non-bugfix work now

Re: [Python-Dev] [Python-checkins] cpython (3.2): adjust braces a bit

2011-10-21 Thread Benjamin Peterson
2011/10/21 Eric V. Smith e...@trueblade.com: On 10/21/2011 12:31 PM, Benjamin Peterson wrote: 2011/10/21 Eric V. Smith e...@trueblade.com: What's the logic for adding some braces, but removing others? No braces if everything is a one-liner, otherwise braces everywhere. Not sure what

Re: [Python-Dev] memcmp performance

2011-10-21 Thread Stefan Behnel
Richard Saunders, 21.10.2011 20:23: As long as the two strings are the same unicode kind, you can use a memcmp to compare. In that case, I would almost argue some memcmp optimization is even more important: unicode strings are potentially 2 to 4 times larger, so the amount of time spent in

Re: [Python-Dev] PEP397 no command line options to python?

2011-10-21 Thread Paul Moore
On 19 October 2011 13:17, Sam Partington sam.parting...@gmail.com wrote: Ok ok, I give up.  Apparently I am the only one who wants to be able to run different versions of python based on the shebang line AND add occasional arguments to the python command line. I don't know if this is of use to

Re: [Python-Dev] memcmp performance

2011-10-21 Thread Antoine Pitrou
On Fri, 21 Oct 2011 18:23:24 + (GMT) Richard Saunders richismyn...@me.com wrote: If both loops are the same unicode kind, we can add memcmp to unicode_compare for an optimization:        Py_ssize_t len = (len1len2) ? len1: len2;     /* use memcmp if both the same kind */     if

Re: [Python-Dev] Status of the PEP 400? (deprecate codecs.StreamReader/StreamWriter)

2011-10-21 Thread Victor Stinner
Le vendredi 29 juillet 2011 19:01:06, Guido van Rossum a écrit : On Fri, Jul 29, 2011 at 8:37 AM, Nick Coghlan ncogh...@gmail.com wrote: On Sat, Jul 30, 2011 at 1:17 AM, Antoine Pitrou solip...@pitrou.net wrote: On Thu, 28 Jul 2011 11:28:43 +0200 Victor Stinner

[Python-Dev] Buildbot failures

2011-10-21 Thread Antoine Pitrou
Hello, There are currently a bunch of various buildbot failures on all 3 branches. I would remind committers to regularly take a look at the buildbots, so that these failures get solved reasonably fast. Regards Antoine. ___ Python-Dev mailing list

Re: [Python-Dev] [Python-checkins] cpython: Issue 13227: Option to make the lru_cache() type specific (suggested by Andrew

2011-10-21 Thread Nick Coghlan
On Fri, Oct 21, 2011 at 1:57 AM, raymond.hettinger python-check...@python.org wrote: +   If *typed* is set to True, function arguments of different types will be +   cached separately.  For example, ``f(3)`` and ``f(3.0)`` will be treated +   as distinct calls with distinct results. I've been

Re: [Python-Dev] [Python-checkins] cpython: Document that packaging doesn’t create __init__.py files (#3902).

2011-10-21 Thread Nick Coghlan
On Fri, Oct 21, 2011 at 11:52 PM, eric.araujo python-check...@python.org wrote: +To distribute extension modules that live in a package (e.g. ``package.ext``), +you need to create you need to create a :file:`{package}/__init__.py` file to +let Python recognize and import your module. you

Re: [Python-Dev] PEP397 no command line options to python?

2011-10-21 Thread Nick Coghlan
On Wed, Oct 19, 2011 at 10:17 PM, Sam Partington sam.parting...@gmail.com wrote: Ok ok, I give up.  Apparently I am the only one who wants to be able to run different versions of python based on the shebang line AND add occasional arguments to the python command line. As a simpler alternative,

[Python-Dev] [PATCH] unicode subtypes broken in latest py3k debug builds

2011-10-21 Thread Stefan Behnel
Hi, the py3k debug build has been broken in Cython's integration tests for a couple of weeks now due to a use-after-decref bug. Here's the fix, please apply. BTW, is there a reason unicode_subtype_new() copies the buffer of the unicode object it just created, instead of just stealing it?