Re: [Python-Dev] Add a -z interpreter flag to execute a zip file

2007-07-23 Thread Daniel Stutzbach
if it starts with one of the ZIP magic numbers? That way it Just Works. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises LLC ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev

Re: [Python-Dev] C Decimal - is there any interest?

2007-10-19 Thread Daniel Stutzbach
(1) and size O(n) instead of pieces of size O(n/2). :-) (where n is number of digits) -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises LLC ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo

Re: [Python-Dev] C Decimal - is there any interest?

2007-10-19 Thread Daniel Stutzbach
conversion): http://people.cis.ksu.edu/~rhowell/calculator/comparison.html -- 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

Re: [Python-Dev] C Decimal - is there any interest?

2007-10-21 Thread Daniel Stutzbach
On 10/19/07, Facundo Batista [EMAIL PROTECTED] wrote: 2007/10/16, Daniel Stutzbach [EMAIL PROTECTED]: I agree. A basic subquadratic radix conversion algorithm isn't much more complex than the existing quadratic code. I just whipped together a Python prototype and it's only 15 lines. Do

[Python-Dev] Alternative C implementation idea for collections.deque

2007-11-14 Thread Daniel Stutzbach
= 4, start = 1} x.popleft() {obs = {5, NULL, 3, 4}, max_len = 4, len = 3, start = 2} x.pop() {obs = {NULL, NULL, 3, 4}, max_len = 4, len = 2, start = 2} Comments? Thoughts? Would a patch be welcome? -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises LLC

Re: [Python-Dev] Alternative C implementation idea for collections.deque

2007-11-14 Thread Daniel Stutzbach
cases, arguing the merits of alternate approaches, and ending-up with substantially the same functionality that we already have. I respect that. I won't waste either of our time, then. Cheers, -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises LLC

Re: [Python-Dev] PATCH: Fast globals/builtins lookups for 2.6

2007-12-27 Thread Daniel Stutzbach
is pretty safe :-) -- 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

Re: [Python-Dev] Return type of round, floor, and ceil in 2.6

2008-01-05 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

Re: [Python-Dev] misbehaving __contains__

2008-01-22 Thread Daniel Stutzbach
): ... def __len__(self): ... return 'foo' ... x = foo() len(x) Traceback (most recent call last): File stdin, line 1, in module TypeError: an integer is required -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises LLC

Re: [Python-Dev] trunc()

2008-01-24 Thread Daniel Stutzbach
to be a built-in, as well provide a starting point for 3.0 best practices. -- 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

Re: [Python-Dev] trunc()

2008-01-27 Thread Daniel Stutzbach
), and doesn't require a builtin. The syntax when used on float literals is ugly (2.56 .round()), but there's no use case for these methods on literals (just write 3). 2to3 could handle this conversion pretty easily in most cases, so there won't be much breakage. -- Daniel Stutzbach, Ph.D

Re: [Python-Dev] functions vs methods (was Re: trunc())

2008-01-28 Thread Daniel Stutzbach
plausibly be both a number or something else? (a Google Code search for def trunc(self) lang:python returns 1 hit) How does the that additional value weigh against the cost of adding another builtin and trying to explain trunc() versus int() to new users? -- Daniel Stutzbach, Ph.D

Re: [Python-Dev] Mutable sequence .sort() signature

2008-02-13 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

Re: [Python-Dev] Complexity documentation request

2008-03-09 Thread Daniel Stutzbach
, the documentation for deque describes the complexity of some of the list type's operations. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises LLC ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo

Re: [Python-Dev] Complexity documentation request

2008-03-10 Thread Daniel Stutzbach
at http://wiki.python.org/moin/TimeComplexity?action=show I'm not that familiar with the Wiki syntax, so the tables are kind of ugly at the moment. I wasn't sure about many of the set() operations, so I didn't include those. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises LLC

Re: [Python-Dev] Complexity documentation request

2008-03-10 Thread Daniel Stutzbach
it). Copying will have to iterate over all slots of the dictionary, and the ratio of slots to keys can grow unbounded if you have just deletions without insertions. I have updated the wiki page accordingly. I assume there is a reason that PyDict_DelItem never calls dictresize? -- Daniel Stutzbach

Re: [Python-Dev] Complexity documentation request

2008-03-12 Thread Daniel Stutzbach
://en.wikipedia.org/wiki/Amortized_analysis -- 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

Re: [Python-Dev] Complexity documentation request

2008-03-13 Thread Daniel Stutzbach
, with some neat ideas to make the best-case O(n). I just made the word Sort into a hyperlink, pointing to the link that Duncan Booth pointed out in another response. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises LLC ___ Python

Re: [Python-Dev] a few strdup() questions...

2009-01-07 Thread Daniel Stutzbach
://msdn.microsoft.com/en-us/library/ms861162.aspx -- 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

[Python-Dev] What's New in Python 2.6: no string exceptions

2009-01-07 Thread Daniel Stutzbach
for possible removal. -- 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] Add Py_off_t and related APIs?

2009-01-13 Thread Daniel Stutzbach
that might have different widths on different platforms? e.g.: uid_t uid = PyNumber_AS_INT_BY_SIZE(number_ob, uid_t); That way, the core does not need to know about every blah_t type used by POSIX and extension modules, while offering convenient conversion functions nonetheless. -- Daniel Stutzbach

Re: [Python-Dev] PEP 3142: Add a while clause to generator expressions

2009-01-19 Thread Daniel Stutzbach
, that could not be rewritten by altering the in clause? -- 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 3142: Add a while clause to generator expressions

2009-01-19 Thread Daniel Stutzbach
you can make a convincing argument on performance. Also, you know the latter is actually fewer characters, right? :-) -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com ___ Python-Dev mailing list Python-Dev

Re: [Python-Dev] subprocess crossplatformness and async communication

2009-01-26 Thread Daniel Stutzbach
). If a program never blocks, then it uses 100% of CPU by definition, which is undesirable. ;-) A program just needs select() so it knows which file descriptors it can call os.read() or os.write() on without blocking. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http

Re: [Python-Dev] Python 3.0.1 (io-in-c)

2009-01-27 Thread Daniel Stutzbach
On Tue, Jan 27, 2009 at 4:54 PM, Antoine Pitrou solip...@pitrou.net wrote: Daniel Stutzbach daniel at stutzbachenterprises.com writes: Would it be much trouble to also compare performance with Python 2.6? Here are the results on trunk. Thanks, Antoine! To make comparison easier, I put

Re: [Python-Dev] Python 3.0.1 (io-in-c)

2009-01-27 Thread Daniel Stutzbach
On Tue, Jan 27, 2009 at 5:44 PM, Antoine Pitrou solip...@pitrou.net wrote: Daniel Stutzbach daniel at stutzbachenterprises.com writes: That's because in Python 3, the Text IO has to convert to Unicode, correct? Yes, exactly. What kind of input are you using for the Text tests? I'm kind

Re: [Python-Dev] Python 3.0.1 (io-in-c)

2009-01-27 Thread Daniel Stutzbach
vaguely in the same ballpark. -- 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] Python 3.0.1 (io-in-c)

2009-01-28 Thread Daniel Stutzbach
On Wed, Jan 28, 2009 at 1:42 PM, Adam Olsen rha...@gmail.com wrote: It'd also help if the file repr gave the encoding: +1 -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com ___ Python-Dev mailing list

Re: [Python-Dev] Partial function application 'from the right'

2009-01-29 Thread Daniel Stutzbach
itself, while it hasn't. The meaning which numpy attributes to Ellipsis is also the meaning that mathematical notation has attached to Ellipsis for a very long time. See: http://en.wikipedia.org/wiki/Ellipsis#In_mathematical_notation -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC

Re: [Python-Dev] Partial function application 'from the right'

2009-01-29 Thread Daniel Stutzbach
, whereas: split_comma = partial(str.split, ..., ',') to me looks like make ',' the last argument rather than make ',' the second argument. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com ___ Python-Dev

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 ___ Python

Re: [Python-Dev] Expression optimizations

2009-02-10 Thread Daniel Stutzbach
differently. 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://mail.python.org/mailman/listinfo/python

Re: [Python-Dev] Expression optimizations

2009-02-10 Thread Daniel Stutzbach
On Tue, Feb 10, 2009 at 2:36 PM, Cesare Di Mauro cesare.dima...@a-tono.comwrote: 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 = nan False -- Daniel Stutzbach, Ph.D

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

2009-02-20 Thread Daniel Stutzbach
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 -- Daniel Stutzbach, Ph.D. President, Stutzbach

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

2009-02-20 Thread Daniel Stutzbach
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-Dev@python.org http://mail.python.org/mailman/listinfo

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

2009-02-22 Thread Daniel Stutzbach
. 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 mailing list Python-Dev@python.org http

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

2009-03-04 Thread Daniel Stutzbach
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: http://mail.python.org/mailman

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

2009-03-04 Thread Daniel Stutzbach
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.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe

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

2009-03-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

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

2009-03-06 Thread Daniel Stutzbach
with unpickling, 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 list Python-Dev

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, s...@pobox.com 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 Enterprises

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

2009-03-12 Thread Daniel Stutzbach
): 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_replacement('mysavefile', 'w'): f.write(data) -- Daniel Stutzbach, Ph.D. President

[Python-Dev] speeding up PyObject_GetItem

2009-03-23 Thread Daniel Stutzbach
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 like overkill? -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises

Re: [Python-Dev] speeding up PyObject_GetItem

2009-03-24 Thread Daniel Stutzbach
play 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 hrvoje.nik...@avl.comwrote: Agreed, and more importantly, I have yet to be convinced that those NULL checks introduce a measurable slowdown. Daniel, have

Re: [Python-Dev] speeding up PyObject_GetItem

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

[Python-Dev] __length_hint__

2009-04-02 Thread Daniel Stutzbach
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). -- Daniel

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

2009-04-09 Thread Daniel Stutzbach
() 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 ___ Python-Dev mailing list

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

2009-04-13 Thread Daniel Stutzbach
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@python.org http://mail.python.org

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

2009-04-13 Thread Daniel Stutzbach
}\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, Stutzbach Enterprises, LLC http://stutzbachenterprises.com ___ Python

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

2009-04-13 Thread Daniel Stutzbach
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: http://mail.python.org

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

2009-04-13 Thread Daniel Stutzbach
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/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman

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

2009-05-04 Thread Daniel Stutzbach
, 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 http

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

2009-05-04 Thread Daniel Stutzbach
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://mail.python.org/mailman/listinfo/python-dev

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 supreet.se...@gmail.com 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

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

2009-05-08 Thread Daniel Stutzbach
, 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 mailing list Python-Dev

Re: [Python-Dev] Flow of control - a new way - Idea

2009-06-30 Thread Daniel Stutzbach
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.python.org/mailman/listinfo/python-dev Unsubscribe: http

Re: [Python-Dev] PEP 3144 review.

2009-09-15 Thread Daniel Stutzbach
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 ___ Python-Dev mailing list Python-Dev@python.org http

Re: [Python-Dev] Epoch and Platform

2008-06-17 Thread Daniel Stutzbach
: Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. import time time.gmtime(0) (1970, 1, 1, 0, 0, 0, 3, 1, 0) -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises LLC

Re: [Python-Dev] PEP 3101: floats format 'f' and 'F'

2008-07-16 Thread Daniel Stutzbach
exponent? Isn't the point of 'f' formatting that there is no exponent? There's no exponent for small-magnitude numbers, but still an exponent for large-magnitude numbers: '%f' % (10**100) '1e+100' -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises LLC

Re: [Python-Dev] Matrix product

2008-07-26 Thread daniel . stutzbach
than ((a*b)*c)*d). (please forgive typos--writing this on a smartphone) -- 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

Re: [Python-Dev] Py_CLEAR and assigning values

2008-08-05 Thread Daniel Stutzbach
all the objects to be Py_DECREF'd in temporary variables and doing the Py_DECREF's just before returning. That way, self is never in an inconsistent state. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com

Re: [Python-Dev] Py_CLEAR and assigning values

2008-08-05 Thread Daniel Stutzbach
are certainly free to create your own macro. :-) -- 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] heapq, min and max

2008-10-22 Thread Daniel Stutzbach
: 600 usec per loop Cashew:/tmp/Python-2.6$ ./python.exe Lib/timeit.py -s 'import datetime' -s 'x = tuple(datetime.datetime.now() for x in range(5000))' 'max(x)' 1000 loops, best of 3: 536 usec per loop (the one in /tmp/ is patched) -- Daniel Stutzbach, Ph.D. http://stutzbachenterprises.com

Re: [Python-Dev] [ANN] VPython 0.1

2008-10-23 Thread Daniel Stutzbach
next_handler jmp next_handler ; executed only once handler1: ; do stuff compute next_handler jmp next_handler handler2: ; do stuff compute next_handler jmp next_handler -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http://stutzbachenterprises.com

Re: [Python-Dev] Trap SIGSEGV and SIGFPE

2008-12-11 Thread Daniel Stutzbach
the stack trace has been printed #3 combined with #5 would be very useful for automated bug reporting. For what it's worth, the functionality could be implemented under Windows using Structured Exception Handling. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC http

Re: [Python-Dev] Atomic instructions for reference count increment/decrement

2008-12-17 Thread Daniel Stutzbach
on the matter or simple arguments why this would not apply to the Python reference counting mechanism. Adam Olsen actually tried it. See: http://mail.python.org/pipermail/python-dev/2007-September/074645.html Other message in that thread describe the problem in more detail. -- Daniel Stutzbach, Ph.D

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

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] 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] 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] 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

[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] 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

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] 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] 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] 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] 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] 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] 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] 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] [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] 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

[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] 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

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] [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] [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] 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-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] 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

  1   2   >