Re: [Python-Dev] gcc 4.2 exposes signed integer overflows

2006-08-26 Thread Daniel Berlin
Jack Howarth wrote: > Guido, > You'll never win that argument with the gcc developers. If you > rely on undefined behavior in the c language standard, they have > in the past, and will continue to, feel free to ignore those cases. > If you plan on ignoring this issue, just be prepared to see a

[Python-Dev] Objecttype of 'locals' argument in PyEval_EvalCode

2006-11-29 Thread Daniel Trstenjak
= -1; 4049 else >>> 4050err = PyDict_SetItem(locals, name, value); 4051 Py_DECREF(name); ... } Changing PyDict_SetItem in line 4050 with PyObject_SetAttr could fix it. Best Regards, Daniel

[Python-Dev] Adding resume (206) support to urllib(2)

2006-12-12 Thread Daniel Watkins
Hi guys, I've just been putting together a podcasting doodad and have included resuming support in it. Is this something that's already in the pipeline or should I abstract it out to urllib and submit a patch? Dan ___ Python-Dev mailing list Python-De

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

2010-12-09 Thread Daniel Stutzbach
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-archive.com

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

2011-01-04 Thread Daniel Stutzbach
kup. That way > 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 (original) > +++ 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

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

2011-01-11 Thread Daniel Stutzbach
-fwrapv -O3 -Wall > -Wstrict-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

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

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 wrote: > Daniel Stutzbach 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? :-) -- D

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

2011-02-12 Thread Daniel Stutzbach
cussion 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: ht

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

2011-02-14 Thread Daniel Stutzbach
u have the skills 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@p

Re: [Python-Dev] Mercurial conversion repositories

2011-02-26 Thread Daniel Stutzbach
of "trunk" altogether? It's history 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

Re: [Python-Dev] Mercurial conversion repositories

2011-02-26 Thread Daniel Stutzbach
On Sat, Feb 26, 2011 at 8:44 AM, Antoine Pitrou 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? > &g

Re: [Python-Dev] Mercurial conversion repositories

2011-02-26 Thread Daniel Stutzbach
ng (similar to Bazaar), bookmarks (similar 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

Re: [Python-Dev] Mercurial conversion repositories

2011-02-26 Thread Daniel Stutzbach
ver" are a matter of perspective. I spent some time on Friday setting up hg-git on my workstation and making a few test commits. It took me awhile to figure out how to get everything working, but it seems to work smoothly now. At some point I'll update http://wiki.python.org/moin/Git

Re: [Python-Dev] of branches and heads

2011-02-27 Thread Daniel Stutzbach
that name. So you can't 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

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

2011-02-27 Thread Daniel Stutzbach
concern 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 __

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/mail

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 push

Re: [Python-Dev] hg diff

2011-03-08 Thread Daniel Stutzbach
o it in hg. I know it's easy 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.o

Re: [Python-Dev] hg diff

2011-03-09 Thread Daniel Stutzbach
ental-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.

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

2011-03-13 Thread Daniel Stutzbach
by the integer biglist.sort(key=lambda s: 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 _

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

2011-03-13 Thread Daniel Stutzbach
(q for p, q in fractions)**2' 'sorted(fractions, key=lambda t: t[0]*max_denominator_sq//t[1])' 100 loops, best of 3: 3.73 msec per 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] I am now lost - committed, pulled, merged, what is "collapse"?

2011-03-21 Thread Daniel Stutzbach
The equivalent way to how we had been using svnmerge would be to use hg transplant to move patches between branches (and never merging the branches). Conversely, the current hg workflow would be similar to committing changes to the earliest applicable svn branch, then doing a full svnmerge to lat

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

2011-03-21 Thread Daniel Stutzbach
me? > People love it because it's a very powerful tool. People hate 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-archive.com

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

2011-03-22 Thread Daniel Stutzbach
hile ago I came across the following nice tool that puts these intermediate commits in a side branch (that can later be abandoned) so they never show up in the main history: https://github.com/bartman/git-wip I imagine something similar could be written for hg. -- Daniel Stutzbach

Re: [Python-Dev] [Python-checkins] cpython (2.7): Issue 10787: Document the probability density function for random.gammavariate.

2011-03-22 Thread Daniel Stutzbach
--- > + math.gamma(alpha) * beta ** alpha > + > """ > > # alpha > 0, beta > 0, mean is alpha*beta, variance is > alpha*beta**2 > > -- > Re

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

2011-03-27 Thread Daniel Stutzbach
analogous to adding a func argument to sum(), which would 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.or

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 wrote: > On Mon, Mar 28, 2011 at 2:11 PM, Daniel Stutzbach > wrote: > > Is there a good use-case for the func argument? > > The examples that Raymond gives in the docs (cumulative > multiplication, running min/max, cash fl

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

2011-03-28 Thread Daniel Stutzbach
an accumulate tool which takes 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

Re: [Python-Dev] abstractmethod doesn't work in classes

2011-04-07 Thread Daniel Urban
> I've found that abstractmethod and similar decorators "don't work" in > classes, inherited from built-in types other than object. http://bugs.python.org/issue5996 ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo

Re: [Python-Dev] python and super

2011-04-14 Thread Daniel Urban
g/issue8733) Daniel ___ 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] Add a -z interpreter flag to execute a zip file

2007-07-23 Thread Daniel Stutzbach
peak at the file to see 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

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

2007-10-19 Thread Daniel Stutzbach
-conquer algorithm, too, except it's the bad kind that breaks the input into pieces of size O(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 __

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

2007-10-19 Thread Daniel Stutzbach
orithm can be found at the link below (search for "Radix conversion"): http://people.cis.ksu.edu/~rhowell/calculator/comparison.html -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises LLC ___ Python-Dev mailing list Python-De

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

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

2007-11-14 Thread Daniel Stutzbach
2, 3, 4}, max_len = 4, len = 3, start = 1} >>> x.append(5) {obs = {5, 2, 3, 4}, max_len = 4, len = 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? Though

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

2007-11-14 Thread Daniel Stutzbach
iming tons of test > 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. Preside

Re: [Python-Dev] Does anyone care enough about asyncore and asynchat to help adapt their APIs for Py3k?

2007-12-05 Thread Daniel Arbuckle
Guido van Rossum wrote: > The asyncore and asynchat modules are in a difficult position when it > comes to Python 3000. None of the core developers use it or > particularly care about it (AFAIK), and the API has problems because > it wasn't written to deal with bytes vs. unicode. E.g. in > http://b

Re: [Python-Dev] Python-Dev Digest, Vol 53, Issue 23

2007-12-08 Thread Daniel Arbuckle
> "Josiah Carlson" <[EMAIL PROTECTED]> wrote: > On Dec 5, 2007 9:19 AM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > > The asyncore and asynchat modules are in a difficult position when it > > comes to Python 3000. None of the core developers use it or > > particularly care about it (AFAIK), and t

[Python-Dev] patching asyncore and asynchat

2007-12-10 Thread Daniel Arbuckle
I've posted a new patch with the documentation for handle_expt and handle_error adjusted, thanks to the feedback from Giampaolo Rodola and James Y Knight. http://bugs.python.org/issue1563 ___ Python-Dev mailing list Python-Dev@python.org http://mail.pyth

Re: [Python-Dev] patching asyncore and asynchat

2007-12-11 Thread Daniel Arbuckle
> From: "Giampaolo Rodola'" <[EMAIL PROTECTED]> > I remembered right now that there's a patch pending which should be > included in the trunk before solving issues related to py3k and/or > applying other changes: > http://bugs.python.org/issue1736190 > Since it solves a lot of older and newer async

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

2007-12-27 Thread Daniel Stutzbach
oop to get an overflow. I think 64 bits 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: htt

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

2008-01-05 Thread Daniel Stutzbach
computed. There is never a need to compute extra digits just to perform the test. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises LLC ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python

Re: [Python-Dev] Python-Dev Digest, Vol 54, Issue 57

2008-01-15 Thread Daniel Arbuckle
On Tue, 15 Jan 2008 06:57:02 -0500, Kevin Jacobs wrote: > On Jan 15, 2008 6:24 AM, Oleg Broytmann <[EMAIL PROTECTED]> wrote: > > > On Mon, Jan 14, 2008 at 11:41:47PM +, Jon Ribbens wrote: > > > It makes sense, but personally I have never heard before of ~/.local. > > > Whereas ~/bin is somethin

Re: [Python-Dev] misbehaving __contains__

2008-01-22 Thread Daniel Stutzbach
ng a precedent that _all_ slots should return a PyObject? Consider the following third behavior: >>> class foo(object): ... def __len__(self): ... return 'foo' ... >>> x = foo() >>> len(x) Traceback (most recent call last): File &qu

Re: [Python-Dev] trunc()

2008-01-24 Thread Daniel Stutzbach
whether both deserve 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/mai

Re: [Python-Dev] trunc()

2008-01-27 Thread Daniel Stutzbach
s/math-module functions? x.trunc() is just as clear as trunc(x), 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 p

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

2008-01-28 Thread Daniel Stutzbach
he variable could 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?

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

2008-02-13 Thread Daniel Stutzbach
example to help users rewrite their code to work with 3.0. -- 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

[Python-Dev] Py3k and asyncore/asynchat

2008-02-13 Thread Daniel Arbuckle
A while back, I volunteered to update asyncore and asynchat for py3k. I posted a patch, and in response to feedback posted a more complicated patch+modification. Both versions have been languishing at http://bugs.python.org/issue1563 for a couple of months now without any further feedback or actio

Re: [Python-Dev] Py3k and asyncore/asynchat

2008-02-13 Thread Daniel Arbuckle
They applied when posted them, but subsequent patches seem to have broken them. I've now posted updated patches that apply cleanly against revision 60780. On Feb 13, 2008 6:52 PM, Bill Janssen <[EMAIL PROTECTED]> wrote: > It's a big patch, but I'll try applying it to the current py3k branch > -- d

Re: [Python-Dev] Py3k and asyncore/asynchat

2008-02-14 Thread Daniel Arbuckle
;t want to see that happen. On Thu, Feb 14, 2008 at 5:55 AM, Giampaolo Rodola' <[EMAIL PROTECTED]> wrote: > (wrong quoting: obvioulsly I was talking to Daniel) > > > ___ > Python-Dev mailing list > Python-Dev@python.org

Re: [Python-Dev] Py_CLEAR to avoid crashes

2008-02-18 Thread Daniel Stutzbach
;m not sure about the effects on the CPU cache. So, like I said, a robustness versus performance trade-off. :-( -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises LLC ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.o

Re: [Python-Dev] Complexity documentation request

2008-03-09 Thread Daniel Stutzbach
in odd places. For example, 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.or

Re: [Python-Dev] Complexity documentation request

2008-03-10 Thread Daniel Stutzbach
very basic one 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. Pr

Re: [Python-Dev] Complexity documentation request

2008-03-10 Thread Daniel Stutzbach
re is a reason that PyDict_DelItem never calls dictresize? -- 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://

Re: [Python-Dev] Complexity documentation request

2008-03-12 Thread Daniel Stutzbach
the time complexity of specific operations. http://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.

Re: [Python-Dev] Complexity documentation request

2008-03-13 Thread Daniel Stutzbach
variant of mergesort, 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. Presid

Re: [Python-Dev] PEP 365 (Adding the pkg_resources module)

2008-03-16 Thread Daniel Krech
On Mar 16, 2008, at 8:06 PM, Phillip J. Eby wrote: > Quick summary of the below: I'm definitely fine with doing a simpler, > pure-bootstrap module, if there's some consensus on what should go in > it. I just wish we could've had this discussion last year, when OSAF > was still able to fund the w

Re: [Python-Dev] __eq__ vs hash

2008-04-05 Thread Daniel Krech
On Apr 4, 2008, at 10:38 AM, Guido van Rossum wrote: > On Fri, Apr 4, 2008 at 2:46 AM, Ralf Schmitt <[EMAIL PROTECTED]> wrote: >> the news file for python 2.6 does not mention that you need to define >> __hash__ in case you define __eq__ for a class. >> This breaks some code (for me: mercurial and

Re: [Python-Dev] [Python-3000] Invitation to try out open source code review tool

2008-05-05 Thread Daniel Berlin
There is a google code support project where google code issues are tracked. http://code.google.com/p/support/ On Mon, May 5, 2008 at 2:56 PM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > That's a good question. I'll find out. > > > > On Mon, May 5, 2008 at 10:56 AM, Georg Brandl <[EMAIL PROTE

[Python-Dev] OFF-TOPIC-BUT-IMPORTANT: End of free internet model by 2012 ?

2008-06-11 Thread Daniel Bonekeeper
ns Bell Canada, it is not that hard to imagine that this will eventually be expanded to all big ISPs. Thanks and again, I apologize for this off-topic message ! Daniel -- What this world needs is a good five-dollar plasma weapon. ___ Python-De

Re: [Python-Dev] Epoch and Platform

2008-06-17 Thread Daniel Stutzbach
d use the Unix epoch: 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,

Re: [Python-Dev] UCS2/UCS4 default

2008-07-03 Thread Daniel Arbuckle
On Thu, Jul 3, 2008 at 5:39 AM, Nick Coghlan <[EMAIL PROTECTED]> wrote: > 1. If you are advocating disallowing the use of characters outside the BMP > in a UCS-2 build, enumerate the advantages of doing so (paying particular > attention to any advantages which cannot be obtained simply by using an

Re: [Python-Dev] UCS2/UCS4 default

2008-07-03 Thread Daniel Arbuckle
On Thu, Jul 3, 2008 at 6:42 AM, Mark Hammond <[EMAIL PROTECTED]> wrote: > For people on Windows, win32 isn't a "compatibility" consideration. I > suspect most users of the other platforms MAL mentioned and all others with > their own native unicode implementations would agree. I'm sorry, but you'

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

2008-07-16 Thread Daniel Stutzbach
drop it, or make it convert the exponent to upper case > > What 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: >>> &

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
to detect that self->x is bogus. Generally, I end up storing 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.

Re: [Python-Dev] Py_CLEAR and assigning values

2008-08-05 Thread Daniel Stutzbach
consistent state. If in your code you frequently need to modifying just one property, you are certainly free to create your own macro. :-) -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com> ___ Python-De

Re: [Python-Dev] heapq, min and max

2008-10-22 Thread Daniel Stutzbach
c per loop Cashew:~/src-other/Python-2.6-pristine$ ./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: 600 usec per loop Cashew:/tmp/Python-2.6$ ./python.exe

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

2008-10-23 Thread Daniel Stutzbach
out that opcode X is often followed by opcode Y). compute 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

[Python-Dev] compiler optimizations: collecting ideas

2008-11-14 Thread Daniel Furrer
optimization that we could have a look at Any feedback would be highly appreciated as well as pointers to specific bugs in the tracker and other relevant discussions. Best regards, Daniel ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.

Re: [Python-Dev] Trap SIGSEGV and SIGFPE

2008-12-11 Thread Daniel Stutzbach
fy a program to run after 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 Ent

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

2008-12-17 Thread Daniel Stutzbach
rs to previous discussion 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 pr

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

2009-01-07 Thread Daniel Stutzbach
http://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/lis

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

2009-01-07 Thread Daniel Stutzbach
new users don't learn features slated 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/mailm

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

2009-01-08 Thread Daniel Stutzbach
On Thu, Jan 8, 2009 at 10:33 AM, Aahz wrote: > On Wed, Jan 07, 2009, Daniel Stutzbach wrote: > > After reading "What's New in Python 2.6" and then upgrading, I quickly > > noticed an omission: string exceptions are no longer supported and raise > a > >

Re: [Python-Dev] Add Py_off_t and related APIs?

2009-01-13 Thread Daniel Stutzbach
types 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. --

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

2009-01-19 Thread Daniel Stutzbach
some slightly more complex examples, 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

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

2009-01-19 Thread Daniel Stutzbach
don't 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

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

2009-01-26 Thread Daniel Stutzbach
is available on p.stdout, use the select module (unless you're on Windows). The child process has to flush its output buffer for this to work, but that isn't Python's problem. -- Daniel Stutzbach, Ph.D. President, Stutzbach Ente

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

2009-01-26 Thread Daniel Stutzbach
lthough that is a common misconception). 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,

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

2009-01-27 Thread Daniel Stutzbach
On Tue, Jan 27, 2009 at 4:44 PM, Antoine Pitrou wrote: > Now here are some performance figures. Text I/O is done in utf-8 with > universal > newlines enabled: > Would it be much trouble to also compare performance with Python 2.6? -- Daniel Stutzbach, Ph.D. President, Stutzbach

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 wrote: > Daniel Stutzbach 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 wrote: > Daniel Stutzbach 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

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

2009-01-27 Thread Daniel Stutzbach
MB/s. That's at least 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/pyt

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

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

2009-01-29 Thread Daniel Stutzbach
n > embedded in the interpreter 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 -- D

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

2009-01-29 Thread Daniel Stutzbach
in context, 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&

Re: [Python-Dev] A question about the subprocess implementation

2012-01-07 Thread Daniel Neuhäuser
That's documented behaviour nonetheless. I would agree that the behaviour is a stupid one (not knowing the reason for it); even so it cannot be changed in a backwards compatible way. Am 07.01.2012 um 22:25 schrieb Vinay Sajip : > The subprocess.Popen constructor takes stdin, stdout and stderr k

Re: [Python-Dev] Providing a mechanism for PEP 3115 compliant dynamic class creation

2012-04-15 Thread Daniel Urban
are' is the same as above). This way we wouldn't even need to make 'prepare' public, and the new way to create a dynamic type would be: from operator import build_class cls = build_class(name, bases, ns, **my_kwargs) Daniel ___ 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] Providing a mechanism for PEP 3115 compliant dynamic class creation

2012-04-15 Thread Daniel Urban
On Sun, Apr 15, 2012 at 13:48, Nick Coghlan wrote: > /me pages thoughts from 12 months ago back into brain... Sorry about that, I planned to do this earlier... > On Sun, Apr 15, 2012 at 7:36 PM, Daniel Urban wrote: >> On Tue, Apr 19, 2011 at 16:10, Nick Coghlan wrote: >>

Re: [Python-Dev] Providing a mechanism for PEP 3115 compliant dynamic class creation

2012-04-16 Thread Daniel Urban
#x27;t assign it to you, but you're on the nosy list. Thanks, Daniel ___ 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] Adding types.build_class for 3.3

2012-05-08 Thread Daniel Urban
e wouldn't work, but with a class statement we could still create such "classes": >>> def f(mcls, name, bases): ... return 0 ... >>> class C(metaclass=f): ... pass ... >>> C 0 Daniel ___ 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] Language reference updated for metaclasses

2012-05-20 Thread Daniel Urban
I think there is a small mistake in section "3.3.3.4. Creating the class object": "After the class object is created, any class decorators included in the *function* definition are invoked ..." That probaly should be "cl

[Python-Dev] An infinite loop in dictobject.c

2012-05-24 Thread Daniel Farina
Hello all. I seem to be encountering somewhat rare an infinite loop in hash table probing while importing _socket, as triggered by init_socket.c in Python 2.6, as seen/patched shipped with Ubuntu 10.04 LTS. The problem only reproduces on 32 bit machines, on both -O2 and -O0 builds (which is how I

Re: [Python-Dev] An infinite loop in dictobject.c

2012-05-24 Thread Daniel Farina
On Thu, May 24, 2012 at 1:07 PM, Nick Coghlan wrote: > If it only started happening recently, suspicion would naturally fall on the > hash randomisation security fix (as I assume a new version of Python would > have been pushed for 10.04 with that update) I do not think so; I do not see in in the

Re: [Python-Dev] An infinite loop in dictobject.c

2012-05-24 Thread Daniel Farina
On Thu, May 24, 2012 at 12:59 PM, Mark Shannon wrote: > Please submit a report to the tracker for this. > (Add me to the nosy list if you can) http://bugs.python.org/issue14903 However, I cannot add you to the nosy list, as you do not show up in the search. -- fdr _

Re: [Python-Dev] An infinite loop in dictobject.c

2012-05-24 Thread Daniel Farina
On Thu, May 24, 2012 at 1:15 PM, Antoine Pitrou wrote: > On Thu, 24 May 2012 12:11:58 -0700 > Daniel Farina wrote: >> >> Finally, what's especially strange is that I had gone a very long time >> running this exact version of Python, libraries, and application qui

<    1   2   3   4   5   6   >