Re: [Python-Dev] Expression optimizations

2009-02-10 Thread Daniel Stutzbach
= a >= b > Those two expressions are equivalent for integers, but not necessarily equivalent for objects that define their own comparison operator. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com>

Re: [Python-Dev] Expression optimizations

2009-02-10 Thread Daniel Stutzbach
ently. "not a in b" and "a not in b" have exactly the same effects. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com> ___ Python-Dev mailing list Python-Dev@python.org http:

Re: [Python-Dev] Expression optimizations

2009-02-10 Thread Daniel Stutzbach
On Tue, Feb 10, 2009 at 2:36 PM, Cesare Di Mauro wrote: > OK, so I can make assumptions only for built-in types. > Yes, but even there you have to be careful of odd corner-cases, such as: >>> nan = float('nan') >>> nan < nan False >>> nan >

Re: [Python-Dev] Choosing a best practice solution for Python/extension modules

2009-02-20 Thread Daniel Stutzbach
ave been rewritten (which happens more often than the > complete rewrite). > A slight change would make it work for modules where only key functions have been rewritten. For example, pickle.py could read: from _pypickle import * try: from _pickle import * except ImportError: pass -- Danie

Re: [Python-Dev] Choosing a best practice solution for Python/extension modules

2009-02-20 Thread Daniel Stutzbach
dule that defined the function. Functions defined in _pypickle would only call the _pypickle version of functions. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com> ___ Python-Dev mailing list Python-De

Re: [Python-Dev] .pythonrc.py in man page

2009-02-22 Thread Daniel Stutzbach
Python 3.0." If user.py has indeed been removed, then Mitchell is correct. http://docs.python.org/library/user.html -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com> ___ Python-Dev mai

Re: [Python-Dev] asyncore fixes in Python 2.6 broke Zope's version of medusa

2009-03-04 Thread Daniel Stutzbach
meaning called "sock". -- 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: h

Re: [Python-Dev] asyncore fixes in Python 2.6 broke Zope's version of medusa

2009-03-04 Thread Daniel Stutzbach
or all of you be at PyCon? I'd be willing to put in the extra work to turn your notes into a PEP. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com> ___ Python-Dev mailing list Python-Dev@python.o

Re: [Python-Dev] asyncore fixes in Python 2.6 broke Zope's version of medusa

2009-03-05 Thread Daniel Stutzbach
s and writes are not necessary. On Windows, sockets, pipes, and files are each completely distinct types with their own functions and unifying them under one select()-like interface requires faking it using threads behind-the-scenes AFAIK. Personally, I'd be happy with continuing to only suppo

Re: [Python-Dev] Pickler/Unpickler API clarification

2009-03-06 Thread Daniel Stutzbach
ickling, but wouldn't solve Michael's problem as, without memo, each pickle would still need to store a copy. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com> ___ Python-Dev mailing lis

Re: [Python-Dev] asyncore fixes in Python 2.6 broke Zope's version of medusa

2009-03-08 Thread Daniel Stutzbach
On Sat, Mar 7, 2009 at 8:28 PM, wrote: > Anybody interested in working on this at a PyCon Sprint? I won't be > attending the conference proper, but plan to spend a couple days sprinting, > I'll be there and interested. :) -- Daniel Stutzbach, Ph.D. President, Stutzbach Ent

Re: [Python-Dev] wait time [was: Ext4 data loss]

2009-03-12 Thread Daniel Stutzbach
ilename() # good luck file.__init__(self.tmp_name, flags) def close(self): self.flush() os.fsync(self.fileno()) self.close() os.rename(self.tmp_name, self.path) # won't work on Windows :-( then we could simply: with appropriate_module.open_for_safe_replacem

[Python-Dev] speeding up PyObject_GetItem

2009-03-23 Thread Daniel Stutzbach
tempted to suggest making these checks only when Py_DEBUG is defined, but I suspect if you wanted it that way, you would have changed it already. ;) Assuming you really want the NULL checks in production Python, there are 5 checks for NULL even though there are only two parameters. Seems li

Re: [Python-Dev] speeding up PyObject_GetItem

2009-03-24 Thread Daniel Stutzbach
ay around with different permutations and report back on their impact. -- 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] speeding up PyObject_GetItem

2009-03-24 Thread Daniel Stutzbach
On Tue, Mar 24, 2009 at 7:30 AM, Daniel Stutzbach < dan...@stutzbachenterprises.com> wrote: > On Tue, Mar 24, 2009 at 4:30 AM, Hrvoje Niksic wrote: > >> Agreed, and more importantly, I have yet to be convinced that those NULL >> checks introduce a measurable slowdown.

Re: [Python-Dev] speeding up PyObject_GetItem

2009-03-24 Thread Daniel Stutzbach
On Tue, Mar 24, 2009 at 10:13 AM, Mark Dickinson wrote: > 2009/3/24 Daniel Stutzbach : > > [...] > > 100 nanoseconds, py3k trunk: > > ceval -> PyObject_GetItem (object.c) -> list_subscript (listobject.c) -> > > PyNumber_AsSsize_t (object.c) -> PyLong_AsS

[Python-Dev] __length_hint__

2009-04-02 Thread Daniel Stutzbach
ticed that if a VERY large hint is returned by the iterator, list.extend will sometimes disregard the hint and try to allocate memory incrementally (correct for rule #1 or #2). However, in another code path it will throw a MemoryError immediately based on the hint (correct for rule #3). -- D

Re: [Python-Dev] Dropping bytes "support" in json

2009-04-09 Thread Daniel Stutzbach
mps() always returns a string) def dumpb(obj, encoding='utf-8', *args, **kw): s = dumps(obj, *args, **kw) return s.encode(encoding) -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com>

Re: [Python-Dev] Dropping bytes "support" in json

2009-04-13 Thread Daniel Stutzbach
e byte stream into a string stream (similar to Python's new TextIOWrapper class). Hope that helps, -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com> ___ Python-Dev mailing list Python-Dev@pyt

Re: [Python-Dev] Dropping bytes "support" in json

2009-04-13 Thread Daniel Stutzbach
on.dumps({}).encode('utf-16le') # dumps() returns str '{\x00}\x00' json.dumps({}, encoding='utf-16le') # dumps() returns bytes '{\x00}\x00' In 2.6, the first one works. The second incorrectly returns '{}'. -- Daniel Stutzbach, Ph.D. President,

Re: [Python-Dev] Dropping bytes "support" in json

2009-04-13 Thread Daniel Stutzbach
logize for not reading more closely. -- 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] Dropping bytes "support" in json

2009-04-13 Thread Daniel Stutzbach
venting users from getting a str out if that's what they want? -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com> ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listi

Re: [Python-Dev] Proposed: drop unnecessary "context" pointer from PyGetSetDef

2009-05-04 Thread Daniel Stutzbach
e, will 3rd party code that relies on it fail in unexpected ways, or will they just get a compile error? -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com> ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] Proposed: drop unnecessary "context" pointer from PyGetSetDef

2009-05-04 Thread Daniel Stutzbach
le I maintain is sprinkled with #ifdef's so it will compile under 2.5, 2.6, and 3.0. ;-) -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com> ___ Python-Dev mailing list Python-Dev@python.org http:

Re: [Python-Dev] using help function in Py3k

2009-05-05 Thread Daniel Stutzbach
On Tue, May 5, 2009 at 5:41 AM, s|s wrote: > LookupError: unknown encoding: uft-8 > uft-8? Looks like a variation of Issue 4540 <http://bugs.python.org/issue4540> (or a duplicate? I can't tell) -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stut

Re: [Python-Dev] special method lookup: how much do we care?

2009-05-08 Thread Daniel Stutzbach
cial, but I don't think we really care this > much. Opinions? > Why does this problem arise only with __enter__ and __exit__? -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com> ___ Python-Dev

Re: [Python-Dev] special method lookup: how much do we care?

2009-05-08 Thread Daniel Stutzbach
ial methods", which is possible) -- 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] Flow of control - a new way - Idea

2009-06-30 Thread Daniel Stutzbach
h the details, but I believe you can get them in Stackless Python. Hope that helps, -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com/> ___ Python-Dev mailing list Python-Dev@python.org http://mail.pyt

Re: [Python-Dev] PEP 3144 review.

2009-09-15 Thread Daniel Stutzbach
Technicalities aside, I agree with you that IPNetwork appears to be doing double-duty as an IPNetwork type and an IPAddressWithNetwork type, which I find confusing. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com> ___

Re: [Python-Dev] PEP 3144 review.

2009-09-16 Thread Daniel Stutzbach
its that aren't in the mask. > Network addresses never contain bits that aren't in the mask (due to the rule: "network address & netmask == network address"). -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com> ___

Re: [Python-Dev] PEP 3144 review.

2009-09-17 Thread Daniel Stutzbach
- Special-Use IPv4 Addresses > RFC 4291 - IPv6 Addressing Architecture > RFC 4632 - Classless Inter-domain Routing (CIDR): The Internet Address > +1 -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com> __

Re: [Python-Dev] Fuzziness in io module specs

2009-09-18 Thread Daniel Stutzbach
now, which lead to this or that > particular implementation choice ? > The original I/O PEP and some of the code was put together during a sprint at PyCon 2007. Our primary goal was to get a decent first cut of the new I/O system put together quickly. For nitty-gritty details and corner-c

Re: [Python-Dev] POSIX [Fuzziness in io module specs]

2009-09-19 Thread Daniel Stutzbach
"", line 1, in OSError: [Errno 9] Bad file descriptor >>> f.write('blah') Traceback (most recent call last): File "", line 1, in IOError: [Errno 9] Bad file descriptor -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterpr

Re: [Python-Dev] POSIX [Fuzziness in io module specs]

2009-09-19 Thread Daniel Stutzbach
y important (imo, most > people just want to know if the operation was successful, I don't know if > many developers scan error codes to act accordingly). > I don't often need to check the error code at runtime but seeing the corresponding message is often critical for debu

Re: [Python-Dev] Fuzziness in io module specs - PEP update proposition

2009-09-20 Thread Daniel Stutzbach
On Sun, Sep 20, 2009 at 4:48 AM, Pascal Chambon wrote: > *RawIOBase*.readinto(b: bytes) -> int > "bytes" are immutable. The signature is: *RawIOBase*.readinto(b: bytearray) -> int Your efforts in working on clarifying these important corner cases is appreciated. :-) --

Re: [Python-Dev] PEP 3144 review.

2009-09-26 Thread Daniel Stutzbach
e Internet, 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." _

Re: [Python-Dev] PEP 3144 review.

2009-09-26 Thread Daniel Stutzbach
On Sat, Sep 26, 2009 at 4:57 PM, DrKJam wrote: > 2009/9/26 Daniel Stutzbach > >> On Sat, Sep 26, 2009 at 2:07 PM, DrKJam wrote: >> >>> The current version of the PEP and reference implementation do not >>> mention or deal with IPv4 classful addressing (A,

Re: [Python-Dev] PEP 3144 review.

2009-09-28 Thread Daniel Stutzbach
, IPv4Network objects with distinct IP addresses (but the same network) could no longer be stored in a dictionary or set. IMO, 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.

Re: [Python-Dev] PEP 3144 review.

2009-09-28 Thread Daniel Stutzbach
tiguous > 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.

Re: [Python-Dev] PEP 3144 review.

2009-09-28 Thread Daniel Stutzbach
re added 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 >>> fractio

Re: [Python-Dev] PEP 3144 review.

2009-09-30 Thread Daniel Stutzbach
his discussion has 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 St

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

2009-10-05 Thread Daniel Stutzbach
On Mon, Oct 5, 2009 at 9:32 AM, Barry Warsaw wrote: > If, as I hope, the answer to that is "yes", then I strongly support > releasing a fixed setuptools instead of reverting the change to Python. > How do your propose to get the author of setuptools to release a new

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

2009-10-11 Thread Daniel Stutzbach
gt; -1 on 1. +0 on 2. It'd be nice if we could 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> ___

Re: [Python-Dev] Better module shutdown procedure

2009-10-14 Thread Daniel Stutzbach
als by setting them 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, Stutz

Re: [Python-Dev] Better module shutdown procedure

2009-10-14 Thread Daniel Stutzbach
referencing 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://mai

Re: [Python-Dev] Better module shutdown procedure

2009-10-14 Thread Daniel Stutzbach
sys.modules with weakrefs 2. Run the garbage 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, St

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

2009-10-18 Thread Daniel Stutzbach
larly 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/mail

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

2009-10-18 Thread Daniel Stutzbach
On Sun, Oct 18, 2009 at 5:46 PM, Antoine Pitrou wrote: > Daniel Stutzbach 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] Add const to python API - issue 6952

2009-10-20 Thread Daniel Stutzbach
es a warning test_const(&const_var); test_noconst(&noconst_var); test_noconst(&const_var); // generates a warning return 0; } -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com> __

Re: [Python-Dev] Reworking the GIL

2009-10-26 Thread Daniel Stutzbach
's 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> ___

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

2009-10-29 Thread Daniel Stutzbach
ler > though. > 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> ___

Re: [Python-Dev] Reworking the GIL

2009-11-02 Thread Daniel Stutzbach
thread 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 <

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

2009-11-03 Thread Daniel Stutzbach
ly need is syntax compatibility. For the rest, you can 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>

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

2009-11-03 Thread Daniel Stutzbach
t types. I'm just putting them through the paces in my own products before releasing them. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com> ___ Python-Dev mailing list Python-Dev@python.org h

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

2009-11-09 Thread Daniel Stutzbach
o forth. The hash table will shrink after 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. Preside

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

2009-11-09 Thread Daniel Stutzbach
ator has to scan through 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

Re: [Python-Dev] Too many Python accounts

2009-11-15 Thread Daniel Stutzbach
On Sun, Nov 15, 2009 at 2:44 PM, "Martin v. Löwis" wrote: > But then, users can easily create as many fake accounts as they want to. > Why not do something more robust, then? For example, when a user enters an OpenID that hasn't been seen by PyPi before, make them enter

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

2009-12-08 Thread Daniel Stutzbach
happen. > 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/listinf

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

2010-01-25 Thread Daniel Stutzbach
hat > 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 <htt

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

2010-01-26 Thread Daniel Stutzbach
r "the full Python test 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:

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

2010-01-26 Thread Daniel Stutzbach
ist 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-d

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

2010-01-27 Thread Daniel Stutzbach
o 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 <ht

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 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. -- Dan

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
n]. That way it doesn't have 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 Stut

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

2010-01-27 Thread Daniel Stutzbach
on mucking with any 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 li

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 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 directory just as eas

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

2010-02-21 Thread Daniel Stutzbach
nounce it via 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/mailma

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

2010-02-23 Thread Daniel Stutzbach
ly replaces 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: htt

[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

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

2010-03-03 Thread Daniel Stutzbach
ue it, would it be best for me 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

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 wrote: > 2010/3/3 Daniel Stutzbach : > > I think I see a way to dramatically speed up PyObject_RichCompareBool > when > > comparing immutable, built-in, non-container objects (int, float, str, > > etc.). It would speed u

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

2010-03-03 Thread Daniel Stutzbach
hat 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://m

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 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, Stutz

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

2010-03-05 Thread Daniel Stutzbach
;Futures" with a class named "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

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

2010-03-06 Thread Daniel Stutzbach
cutor 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 Unsubscr

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

2010-03-06 Thread Daniel Stutzbach
-GUI async code can just use the ABC and not worry about what event loop is running underneath (be it TCL, GTK, or just poll()). -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com> ___ Python-Dev mail

Re: [Python-Dev] "Fixing" the new GIL

2010-03-13 Thread Daniel Stutzbach
like the second 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://

Re: [Python-Dev] WeakSet in Python 2.7

2010-03-29 Thread Daniel Stutzbach
he 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/mailma

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 wrote: > 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, St

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

2010-04-12 Thread Daniel Stutzbach
opt(socket.SOL_SOCKET, 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 <ht

Re: [Python-Dev] Tuning Python dicts

2010-04-13 Thread Daniel Stutzbach
where you 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.pytho

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

2010-04-16 Thread Daniel Stutzbach
rather than going through 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 &

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 wrote: > 2010/4/16 Daniel Stutzbach : > > 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 > > operations can

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, St

[Python-Dev] bug tracker permissions request

2010-04-27 Thread Daniel Stutzbach
". I only find 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, S

Re: [Python-Dev] bug tracker permissions request

2010-04-27 Thread Daniel Stutzbach
he 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 mailin

Re: [Python-Dev] bug tracker permissions request

2010-04-27 Thread Daniel Stutzbach
document 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 Stutz

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

2010-06-24 Thread Daniel Stutzbach
ish debug builds, profiling 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 Pyth

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

2010-07-01 Thread Daniel Stutzbach
erver, but I'm told it can work the other 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/m

Re: [Python-Dev] Mercurial migration readiness

2010-07-03 Thread Daniel Stutzbach
hat repository: > > $ 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

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

2010-07-16 Thread Daniel Stutzbach
http://mail.python.org/pipermail/python-dev/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

Re: [Python-Dev] cProfile and threads

2010-08-17 Thread Daniel Stutzbach
ential if you > want 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://m

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

2010-08-20 Thread Daniel Stutzbach
y inline except using MSC 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

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

2010-08-21 Thread Daniel Stutzbach
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, Stut

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

2010-08-21 Thread Daniel Stutzbach
On Sat, Aug 21, 2010 at 3:47 AM, "Martin v. Löwis" wrote: > Please send me your SSH key. Done. I have also subscribed to python-committers and python-checkins. I will add my interests to Misc/maintainers.rst. Are there any other initial start-up tasks I should perform? -- Dan

Re: [Python-Dev] Shared Folders Under Vista

2010-08-22 Thread Daniel Stutzbach
XP/Cygwin system 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/lis

Re: [Python-Dev] PEP 384 status

2010-08-31 Thread Daniel Stutzbach
same 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] 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 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 Enterpri

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

2010-09-04 Thread Daniel Stutzbach
larger query, 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.o

Re: [Python-Dev] Garbage announcement printed on interpreter shutdown

2010-09-10 Thread Daniel Stutzbach
ature. -1 on removing the feature -0 on making it disabled by default [1] I know that some large, long-running programs periodically check gc.garbage and carefully choose where to break cycles, but those are the exception and not the rule. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprise

  1   2   >