Re: [Python-Dev] [Python-checkins] cpython: Add optional *func* argument to itertools.accumulate().

2011-03-28 Thread Daniel Stutzbach
On Sun, Mar 27, 2011 at 10:53 PM, Nick Coghlan ncogh...@gmail.com wrote: On Mon, Mar 28, 2011 at 2:11 PM, Daniel Stutzbach stutzb...@google.com wrote: Is there a good use-case for the func argument? The examples that Raymond gives in the docs (cumulative multiplication, running min/max

Re: [Python-Dev] [Python-checkins] cpython: Add optional *func* argument to itertools.accumulate().

2011-03-28 Thread Daniel Stutzbach
arbitrary functions. Thanks. I had not been thinking along numeric lines. I can see how these would be useful for working with matrices, vectors, and similar constructs. -- Daniel Stutzbach ___ Python-Dev mailing list Python-Dev@python.org http

Re: [Python-Dev] [Python-checkins] cpython: Add optional *func* argument to itertools.accumulate().

2011-03-27 Thread Daniel Stutzbach
give it all of the power of reduce(). -- Daniel Stutzbach ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] I am now lost - committed, pulled, merged, what is collapse?

2011-03-21 Thread Daniel Stutzbach
. -- Daniel Stutzbach ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Hg: inter-branch workflow

2011-03-21 Thread Daniel Stutzbach
it because it allows you to shoot yourself in the foot. -- Daniel Stutzbach ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail

Re: [Python-Dev] Python3 regret about deleting list.sort(cmp=...)

2011-03-13 Thread Daniel Stutzbach
: s.split(',')[0]) # Sort by the shortstring I think the use cases are pretty narrow where there's plenty of memory for storing the list but not enough to store two copies. -- Daniel Stutzbach ___ Python-Dev mailing list Python-Dev@python.org http

Re: [Python-Dev] Python3 regret about deleting list.sort(cmp=...)

2011-03-13 Thread Daniel Stutzbach
loop -- Daniel Stutzbach ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] hg diff

2011-03-09 Thread Daniel Stutzbach
-branch git diff master...experimental-branch The idea is to pull their remote branch but not merge it, which will create multiple heads locally. Then find the common ancestor of my regular local head and the new head, and diff the ancestor with the new head. -- Daniel Stutzbach

Re: [Python-Dev] hg diff

2011-03-08 Thread Daniel Stutzbach
in git; I assume it's easy in hg. I did some searching but was unable to come up with the right incantation. -- Daniel Stutzbach ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http

Re: [Python-Dev] hg diff

2011-03-07 Thread Daniel Stutzbach
if they have addressed your earlier comments or not. You can also just tweak a few things and push the changes back to them. They can easily merge your changes with any changes they've made in the meantime (which is hard to do if you're pushing patch files around). -- Daniel Stutzbach

Re: [Python-Dev] .hgignore (was: Mercurial conversion repositories)

2011-03-05 Thread Daniel Stutzbach
that shouldn't be tracked. If the goal is to prevent something from being committed, shouldn't the check go in a pre-commit hook instead? -- Daniel Stutzbach ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python

Re: [Python-Dev] of branches and heads

2011-02-27 Thread Daniel Stutzbach
create two disconnected subgraphs whose nodes have the same branch name. That's not completely correct. You *can* do that. Can we create a hook on the server to reject changesets like that? -- Daniel Stutzbach ___ Python-Dev mailing list Python

Re: [Python-Dev] [Python-checkins] hooks: Fix checkbranch hook

2011-02-27 Thread Daniel Stutzbach
is that people may create named branches locally as part of their own workflow, then mistakenly push those branches instead of collapsing back to a single commit against the relevant line of development. +1 -- Daniel Stutzbach ___ Python-Dev mailing list

Re: [Python-Dev] Mercurial conversion repositories

2011-02-26 Thread Daniel Stutzbach
is a strict subset of the 2.7 branch's history, isn't it? -- Daniel Stutzbach ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail

Re: [Python-Dev] Mercurial conversion repositories

2011-02-26 Thread Daniel Stutzbach
On Sat, Feb 26, 2011 at 8:44 AM, Antoine Pitrou solip...@pitrou.net wrote: Le samedi 26 février 2011 à 08:38 -0800, Daniel Stutzbach a écrit : Can we just get rid of trunk altogether? It's history is a strict subset of the 2.7 branch's history, isn't it? Named branches are exclusive

Re: [Python-Dev] Mercurial conversion repositories

2011-02-26 Thread Daniel Stutzbach
to git), and named branches. So a named branch can contain more than one branch. Were there reasons for going with named branches over bookmarks? PEP 385 discusses only cloning and named branches. I'm just curious, not trying to start a long discussion. :-) -- Daniel Stutzbach

Re: [Python-Dev] Mercurial conversion repositories

2011-02-26 Thread Daniel Stutzbach
. -- Daniel Stutzbach ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] [Python-checkins] r88395 - python/branches/py3k/Lib/asyncore.py

2011-02-14 Thread Daniel Stutzbach
and experience so that designing a async API is not as hard for you, please run with it. :-) Personally, I would love to see asyncore deprecated in favor of something better. -- Daniel Stutzbach ___ Python-Dev mailing list Python-Dev@python.org http

Re: [Python-Dev] [Python-checkins] r88395 - python/branches/py3k/Lib/asyncore.py

2011-02-12 Thread Daniel Stutzbach
discussion before PyCon 2009, but not much came of it: http://mail.python.org/pipermail/python-dev/2009-March/086678.html -- Daniel Stutzbach ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe

Re: [Python-Dev] [Python-checkins] r88395 - python/branches/py3k/Lib/asyncore.py

2011-02-11 Thread Daniel Stutzbach
On Fri, Feb 11, 2011 at 8:06 AM, Guido van Rossum gu...@python.org wrote: And finally remember that asyncore is the most monkey-patched module in the world. :-) I propose that in Python 3.3 we rename asyncore to barrel_of_monkeys. -- Daniel Stutzbach

Re: [Python-Dev] [Python-checkins] r88395 - python/branches/py3k/Lib/asyncore.py

2011-02-11 Thread Daniel Stutzbach
On Fri, Feb 11, 2011 at 10:36 AM, Antoine Pitrou solip...@pitrou.netwrote: Daniel Stutzbach stutzb...@google.com wrote: I propose that in Python 3.3 we rename asyncore to barrel_of_monkeys. Would that be a Mapping or a Sequence? Before or after monkey-patching? :-) -- Daniel Stutzbach

Re: [Python-Dev] [Python-checkins] r87903 - python/branches/py3k/Doc/whatsnew/3.2.rst

2011-01-11 Thread Daniel Stutzbach
) +++ python/branches/py3k/Doc/whatsnew/3.2.rst Mon Jan 10 22:26:49 2011 @@ -553,7 +553,7 @@ range(0, 100, 2)[0:5] range(0, 10, 2) - (Contributed by Daniel Stutzback in :issue:`9213` and by Alexander Belopolsky + (Contributed by Daniel Stutzbach in :issue:`9213` and by Alexander

Re: [Python-Dev] FYI: Python 2.7.1 + gcc 4.6 (experimental) probable optimizer problem

2011-01-11 Thread Daniel Stutzbach
-prototypes' ./python -E ./setup.py build make: *** [sharedmods] Error 139 Does that version of gcc emit any warnings during compilation? -- Daniel Stutzbach ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev

Re: [Python-Dev] Possible optimization for LOAD_FAST ?

2011-01-04 Thread Daniel Stutzbach
the code remains the same no matter if the dict has changed or not. I have had similar ideas in the past but have never found time to explore them. The same mechanism could also be used to speed up attribute access on objects. -- Daniel Stutzbach

Re: [Python-Dev] Can't compile regex module with Python 3.2

2010-12-09 Thread Daniel Stutzbach
=markup Do you have an old unicodeobject.h somehow? -- Daniel Stutzbach ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail

[Python-Dev] I/O ABCs

2010-11-30 Thread Daniel Stutzbach
(). [4]: http://www.google.com/codesearch?hl=ensa=Nq=BufferedIOBase++lang:pythonct=rrcs_r=lang:python -- Daniel Stutzbach ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http

Re: [Python-Dev] Continuing 2.x

2010-10-27 Thread Daniel Stutzbach
) -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com/ ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python

Re: [Python-Dev] Continuing 2.x

2010-10-27 Thread Daniel Stutzbach
to Mercurial, so svnmerge would not be helpful for much longer. On the plus side, since Mercurial is a Distributed Version Control System, if you setup an unofficial continuation of Python 2 on the host of your choice, it will be easy for you to pull patches from py3k. -- Daniel Stutzbach, Ph.D

Re: [Python-Dev] [Python-checkins] r85486 - python/branches/py3k/configure

2010-10-14 Thread Daniel Stutzbach
On Thu, Oct 14, 2010 at 12:38 PM, barry.warsaw python-check...@python.orgwrote: -# Generated by GNU Autoconf 2.65 for python 3.2. +# Generated by GNU Autoconf 2.67 for python 3.2. Was the change in autoconf versions intentional and/or is it a problem? -- Daniel Stutzbach, Ph.D. President

Re: [Python-Dev] Distutils2 scripts

2010-10-11 Thread Daniel Stutzbach
Wensleydale. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com/ ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman

Re: [Python-Dev] Rietveld integration into Roundup

2010-10-03 Thread Daniel Stutzbach
On Sat, Oct 2, 2010 at 3:55 PM, Martin v. Löwis mar...@v.loewis.dewrote: I'll have to come up with a better way to determine the branch which a patch was created on. That would also be helpful for those of us using DVCS software to talk to the svn server. :-) -- Daniel Stutzbach, Ph.D

Re: [Python-Dev] API for binary operations on Sets

2010-09-30 Thread Daniel Stutzbach
, and index tuple, range, and str types all register as following the Sequence ABC. list and bytearray types register as following the MutableSequence ABC, which is a subclass of the Sequence ABC. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com

Re: [Python-Dev] We should be using a tool for code reviews

2010-09-30 Thread Daniel Stutzbach
tolerate ;) ) additional review of their code. The hard part is encouraging contributors to find the time and motivation to thoroughly review code that they aren't personally interested in (and perhaps not even familiar with). -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http

Re: [Python-Dev] We should be using a tool for code reviews

2010-09-30 Thread Daniel Stutzbach
) Obviously there would be many non-trivial details to work out. I'm just brainstorming. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com/ ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org

Re: [Python-Dev] We should be using a tool for code reviews

2010-09-29 Thread Daniel Stutzbach
about the opposite approach: make a Python-specific version of upload.py that lets the user attach the patch to an issue with an optional message? -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com/ ___ Python

Re: [Python-Dev] Atlassian and bitbucket merge

2010-09-29 Thread Daniel Stutzbach
and then runs hooks. Obviously, it would not be possible to write hooks that reject changesets, but it would be possible to write hooks that send email or notify buildbots. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com

Re: [Python-Dev] PyObject_GC_UnTrack() no longer reliable in 2.7?

2010-09-24 Thread Daniel Stutzbach
tracking/untracking based on contents would use some other new API (which would be non-public in 2.7.x). Where would the extra state information be stored? (to distinguish untracked and untracked-and-keep-it-that-way) -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http

Re: [Python-Dev] new LRU cache API in Py3.2

2010-09-04 Thread Daniel Stutzbach
, plus there are multiple functions that want to talk to the cache. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo

Re: [Python-Dev] r84430 - in python/branches/py3k: Include/unicodeobject.h Objects/unicodeobject.c

2010-09-03 Thread Daniel Stutzbach
On Thu, Sep 2, 2010 at 6:26 PM, Victor Stinner victor.stin...@haypocalc.com wrote: But I didn't found any doc for other Py_UNICODE_str*() functions in Doc/c-api/*.rst. http://bugs.python.org/issue8649 - Py_UNICODE_* functions are undocumented -- Daniel Stutzbach, Ph.D. President, Stutzbach

Re: [Python-Dev] PEP 384 status

2010-08-31 Thread Daniel Stutzbach
version of the C library. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http

Re: [Python-Dev] Request for commits and/or privileges

2010-08-22 Thread Daniel Stutzbach
related to sets or set ABCs unless you have signed off on it in some way. Perhaps in time there will be some piece of Python that I've modified so heavily that I become ipso facto the primary maintainer, but I'm in no hurry. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC

Re: [Python-Dev] Request for commits and/or privileges

2010-08-22 Thread Daniel Stutzbach
? -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] Shared Folders Under Vista

2010-08-22 Thread Daniel Stutzbach
and did not see the shared folder icon in Explorer. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev

[Python-Dev] Request for commits and/or privileges

2010-08-20 Thread Daniel Stutzbach
http://bugs.python.org/issue2521 - ABC caches should use weak refs http://bugs.python.org/issue808164 - socket.close() doesn't play well with __del__ Many more in the pipeline :-) -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC ___ Python

Re: [Python-Dev] cProfile and threads

2010-08-17 Thread Daniel Stutzbach
to take a profililng snapshot of a running application. +1 -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev

Re: [Python-Dev] versioned .so files for Python 3.2

2010-07-16 Thread Daniel Stutzbach
/2010-June/100583.html On the flip side, a fully enumerated ABI signature could be used to identify (in)compatible binary eggs, which is basically impossible now. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com

Re: [Python-Dev] Mercurial migration readiness

2010-07-03 Thread Daniel Stutzbach
: $ hg clone pytrunk-upstream pytrunk-work $ ./configure make My question is basically the same as Terry Reedy's, but I'm going to phrase it a bit differently: This is perhaps a naive question, but why do you create a second local clone instead of just creating a branch? -- Daniel Stutzbach, Ph.D

Re: [Python-Dev] Mercurial migration readiness (was: Taking over the Mercurial Migration)

2010-07-01 Thread Daniel Stutzbach
way around with a bit of work. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http

Re: [Python-Dev] versioned .so files for Python 3.2

2010-06-24 Thread Daniel Stutzbach
builds, Unicode width (see issue8654), and probably several other ./configure options. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org

[Python-Dev] bug tracker permissions request

2010-04-27 Thread Daniel Stutzbach
the time to produce patches once in awhile, but when I have the time I usually produce more than one. Assigning bugs to myself will increase my motivation to write patches, as I will feel that I've made a commitment to fixing them. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http

Re: [Python-Dev] bug tracker permissions request

2010-04-27 Thread Daniel Stutzbach
of the different fields in the bug tracker? I've read http://www.python.org/dev/workflow/, but it doesn't cover everything. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com ___ Python-Dev mailing list Python-Dev

Re: [Python-Dev] bug tracker permissions request

2010-04-27 Thread Daniel Stutzbach
the Resolution or Status fields. For the Keywords field, the page only documents the easy keyword. Also, some of the headings in the page are enclosed in square brackets, while others are not. It's not clear to me what the brackets are intended to designate. -- Daniel Stutzbach, Ph.D. President, Stutzbach

Re: [Python-Dev] http://bugs.python.org/ is down

2010-04-17 Thread Daniel Stutzbach
On Sat, Apr 17, 2010 at 12:17 PM, Victor Stinner victor.stin...@haypocalc.com wrote: http://bugs.python.org/ displays Service Temporarily Unavailable. Is it normal? It's working fine for me. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com

Re: [Python-Dev] Very Strange Argument Handling Behavior

2010-04-16 Thread Daniel Stutzbach
the slower PyObject_ functions. Consequently, validating **kwds should be cheap. I don't know if the the current validating of **kwds with Python functions already leverages that hack or not. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com

Re: [Python-Dev] Very Strange Argument Handling Behavior

2010-04-16 Thread Daniel Stutzbach
On Fri, Apr 16, 2010 at 4:51 PM, Benjamin Peterson benja...@python.orgwrote: 2010/4/16 Daniel Stutzbach dan...@stutzbachenterprises.com: IIRC, there's a performance hack in dictobject.c that keeps track of whether all of the keys are strings or not. The hack is designed so that lookup

Re: [Python-Dev] Tuning Python dicts

2010-04-13 Thread Daniel Stutzbach
are ahead of the current dict implementation and where you are behind. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo

Re: [Python-Dev] stdlib socket usage and keepalive

2010-04-12 Thread Daniel Stutzbach
, socket.SO_KEEPALIVE, 1) Most non-trivial applications use select() or poll() to avoid blocking calls and do their own timeout-checking at the application layer, so they don't need KEEPALIVE. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com

Re: [Python-Dev] WeakSet in Python 2.7

2010-03-29 Thread Daniel Stutzbach
to backport the fix for this reference leak: http://bugs.python.org/issue2521 -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo

Re: [Python-Dev] WeakSet in Python 2.7

2010-03-29 Thread Daniel Stutzbach
On Mon, Mar 29, 2010 at 2:21 PM, Michael Foord mich...@voidspace.org.ukwrote: It should be possible to fix it with a WeakKeyDictionary instead of WeakSet. True. I should have said Backporting WeakSet would make it *easier* to backport the fix ... :-) -- Daniel Stutzbach, Ph.D. President

Re: [Python-Dev] Fixing the new GIL

2010-03-13 Thread Daniel Stutzbach
approach as well, assuming interactiveness can be computed cheaply. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo

Re: [Python-Dev] [PEP 3148] futures - execute computations asynchronously

2010-03-06 Thread Daniel Stutzbach
instance is then free to do so. +1 -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http

Re: [Python-Dev] [PEP 3148] futures - execute computations asynchronously

2010-03-06 Thread Daniel Stutzbach
loop is running underneath (be it TCL, GTK, or just poll()). -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev

Re: [Python-Dev] [PEP 3148] futures - execute computations asynchronously

2010-03-05 Thread Daniel Stutzbach
On Fri, Mar 5, 2010 at 12:03 AM, Brian Quinlan br...@sweetapp.com wrote: import futures +1 on the idea, -1 on the name. It's too similar to from __future__ import Also, the PEP should probably link to the discussions on stdlib-sig? -- Daniel Stutzbach, Ph.D. President, Stutzbach

Re: [Python-Dev] [PEP 3148] futures - execute computations asynchronously

2010-03-05 Thread Daniel Stutzbach
Future. Why not name your module concurrent? That would eliminate the confusion with from __future__. I don't see a problem with keeping the class name. Plus, a concurrent module might be useful for things other than Futures, in the future. ;-) Just my 0.02 cents, -- Daniel Stutzbach, Ph.D

Re: [Python-Dev] Caching function pointers in type objects

2010-03-03 Thread Daniel Stutzbach
to implement it as a patch to Unladen Swallow, CPython trunk, or CPython py3k? -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman

Re: [Python-Dev] Caching function pointers in type objects

2010-03-03 Thread Daniel Stutzbach
On Wed, Mar 3, 2010 at 3:29 PM, Benjamin Peterson benja...@python.orgwrote: 2010/3/3 Daniel Stutzbach dan...@stutzbachenterprises.com: I think I see a way to dramatically speed up PyObject_RichCompareBool when comparing immutable, built-in, non-container objects (int, float, str, etc

Re: [Python-Dev] Caching function pointers in type objects

2010-03-03 Thread Daniel Stutzbach
in understanding that it will be a while before the Unladen Swallow benchmarks can support Python 3, right? -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com ___ Python-Dev mailing list Python-Dev@python.org http

[Python-Dev] Caching function pointers in type objects

2010-03-02 Thread Daniel Stutzbach
In CPython, is it safe to cache function pointers that are in type objects? For example, if I know that some_type-tp_richcompare is non-NULL, and I call it (which may execute arbitrary user code), can I assume that some_type-tp_richcompare is still non-NULL? -- Daniel Stutzbach, Ph.D. President

Re: [Python-Dev] Platform extension for distutils on other interpreters than CPython

2010-02-23 Thread Daniel Stutzbach
functions for speed. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org

Re: [Python-Dev] Mercurial repository for Python benchmarks

2010-02-21 Thread Daniel Stutzbach
a reply to this thread? I'd like to check it out. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe

Re: [Python-Dev] PEP 3147: PYC Repository Directories

2010-01-30 Thread Daniel Stutzbach
On Sat, Jan 30, 2010 at 8:21 PM, Vitor Bosshard algor...@gmail.com wrote: Putting the files into a separate dir also makes it much harder to work with external tools; e.g. VCSes already ignore .pyc and .pyo files, but not unknown directories. Can't a VCS be configured to ignore a .pyr

Re: [Python-Dev] patch to make list.pop(0) work in O(1) time

2010-01-27 Thread Daniel Stutzbach
list, you can just erase it; no need to recopy the whole list. I don't think your analogy works, unless you recopy your to-do lists whenever you complete a task in the middle of the list. ;-) -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com

Re: [Python-Dev] patch to make list.pop(0) work in O(1) time

2010-01-27 Thread Daniel Stutzbach
On Wed, Jan 27, 2010 at 9:55 AM, Steve Howell showel...@yahoo.com wrote: Fair enough, but that's still wasteful of memory, keeping around a bunch of None elements because you can't inexpensively delete them. Even if there are many references to it, there is only one None element. -- Daniel

Re: [Python-Dev] O(1) random access to deque? (Re: patch to make list.pop(0) work in O(1) time)

2010-01-27 Thread Daniel Stutzbach
to regularly allocate and deallocate memory for an approximately-fixed-length FIFO queue (which Steve's list will need to do). Raymond's objections are here: http://mail.python.org/pipermail/python-dev/2007-November/075244.html -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http

Re: [Python-Dev] patch to make list.pop(0) work in O(1) time

2010-01-27 Thread Daniel Stutzbach
of the fundamental data structures until the Unladen Swallow patch lands (assuming it lands). -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org

Re: [Python-Dev] patch to make list.pop(0) work in O(1) time

2010-01-26 Thread Daniel Stutzbach
suite? -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options

Re: [Python-Dev] patch to make list.pop(0) work in O(1) time

2010-01-26 Thread Daniel Stutzbach
will always be exactly the right size. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe

Re: [Python-Dev] patch to make list.pop(0) work in O(1) time

2010-01-25 Thread Daniel Stutzbach
that the list itself gets garbage collected. FWIW, for a long-running FIFO queue, it's critical to release some of the memory along the way, otherwise the amount of wasted memory is unbounded. Good luck :) -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http

Re: [Python-Dev] recursive closures - reference leak

2009-12-08 Thread Daniel Stutzbach
. That strikes me as a *predictable* long pause. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev

Re: [Python-Dev] Too many Python accounts

2009-11-15 Thread Daniel Stutzbach
. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options

Re: [Python-Dev] Retrieve an arbitrary element from asetwithoutremoving it

2009-11-09 Thread Daniel Stutzbach
the n/2-th removal, when we have checked 1 + 2 + 3 + ... + n/2 = O(n**2) slots for n/2 removals (or amortized O(n) per removal). It's too late for shrinking to save us; we've already performed too much work. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http

Re: [Python-Dev] Retrieve an arbitrary element from asetwithoutremoving it

2009-11-09 Thread Daniel Stutzbach
the table for non-empty entries. (the above assumes a good hash function with few collisions, of course) -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com ___ Python-Dev mailing list Python-Dev@python.org http

Re: [Python-Dev] 2.7 Release? 2.7 == last of the 2.x line?

2009-11-03 Thread Daniel Stutzbach
check sys.version_info. In a nutshell, I don't think you need two branches to support an extension module on Python 2 and Python 3. YMMV. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com ___ Python-Dev mailing

Re: [Python-Dev] Retrieve an arbitrary element from a set withoutremoving it

2009-11-03 Thread Daniel Stutzbach
before releasing them. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http

Re: [Python-Dev] Reworking the GIL

2009-11-02 Thread Daniel Stutzbach
to relinquish the remainder of its time slice to any other thread of equal priority that is ready to run. (this is not to say that I think the solution with Sleep is worthwhile, though...) -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com

Re: [Python-Dev] MSDN subscribers: Using Visual Studio?

2009-10-29 Thread Daniel Stutzbach
. It does. If I recall correctly, in addition to Visual Studio Express, I also needed the Windows SDK (which is also free as in beer). -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com ___ Python-Dev

Re: [Python-Dev] Reworking the GIL

2009-10-26 Thread Daniel Stutzbach
time budget is merely paused during I/O rather than reset, then a thread making frequent (but short) I/O requests cannot starve the system. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com ___ Python-Dev

Re: [Python-Dev] Add const to python API - issue 6952

2009-10-20 Thread Daniel Stutzbach
); test_noconst(noconst_var); test_noconst(const_var); // generates a warning return 0; } -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] SIGCHECK() in longobject.c

2009-10-18 Thread Daniel Stutzbach
. (particularly when I didn't *intend* to do a million-digits calculation... ;) ) -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman

Re: [Python-Dev] SIGCHECK() in longobject.c

2009-10-18 Thread Daniel Stutzbach
On Sun, Oct 18, 2009 at 5:46 PM, Antoine Pitrou solip...@pitrou.net wrote: Daniel Stutzbach daniel at stutzbachenterprises.com writes: I sometimes do million-digits calculations that I want to interrupt using Control-C.(particularly when I didn't *intend* to do a million-digits calculation

Re: [Python-Dev] Better module shutdown procedure

2009-10-14 Thread Daniel Stutzbach
to None. It zaps them to weakrefs first, which means that globals are more likely to be valid during __del__, but it still cannot make any guarantees and referencing globals from __del__ is still a bad idea. Is that a correct synopsis? -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC

Re: [Python-Dev] Better module shutdown procedure

2009-10-14 Thread Daniel Stutzbach
a global variable in __del__ will be 100% safe? (not just likely) -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo

Re: [Python-Dev] Better module shutdown procedure

2009-10-14 Thread Daniel Stutzbach
collector 3. Replace globals in any remaining modules with None 4. Run the garbage collector Is it possible for a __del__ method to be called in step 4 or not? I am still unclear on this point. :-) -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com

Re: [Python-Dev] Weak dict iterators are fragile

2009-10-11 Thread Daniel Stutzbach
postpone the resize if there are active iterators, but I don't think there's a clean way to track the iterators. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] Package install failures in 2.6.3

2009-10-05 Thread Daniel Stutzbach
? -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev

Re: [Python-Dev] PEP 3144 review.

2009-09-30 Thread Daniel Stutzbach
focused too much on the details of ipaddr (and the false dichotomy of ipaddr versus nothing), without properly tackling the question of What use-cases for IP addresses are sufficiently universal* that they belong in the standard library? -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC

Re: [Python-Dev] PEP 3144 review.

2009-09-28 Thread Daniel Stutzbach
, it is a little counter-intuitive for objects to compare equal yet have different properties. I don't think this is a good compromise. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com ___ Python-Dev mailing list

Re: [Python-Dev] PEP 3144 review.

2009-09-28 Thread Daniel Stutzbach
-contiguous netmasks are valid, and is dated 2008. Earlier RFCs (950 and 1219) give them as valid but discouraged. That's a draft for RFC 5177. In the RFC, all references to non-contiguous subnets have been removed. http://tools.ietf.org/html/rfc5177 -- Daniel Stutzbach, Ph.D. President, Stutzbach

Re: [Python-Dev] PEP 3144 review.

2009-09-28 Thread Daniel Stutzbach
in Python 2.6: Python 2.6.2 (r262:71600, Apr 15 2009, 07:20:39) [GCC 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)] on cygwin Type help, copyright, credits or license for more information. import fractions fractions.Fraction(6,4) Fraction(3, 2) -- Daniel Stutzbach, Ph.D. President, Stutzbach

Re: [Python-Dev] PEP 3144 review.

2009-09-26 Thread Daniel Stutzbach
, such scenarios are no longer operationally relevant. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com The plumage don't enter into it. It's stone dead. ___ Python-Dev mailing list Python-Dev@python.org http

  1   2   >