Re: [Python-Dev] r87389 - in python/branches/py3k: Doc/library/unittest.rst Lib/unittest/case.py Misc/NEWS

2010-12-23 Thread Simon Brunning
On 22 December 2010 01:37, Guido van Rossum wrote: > Furthermore, Java's jUnit puts expected first (and makes this part of > the culture/religion), so people coming from there will use that order > and be freaked out if you were to swap them. And last, the order of > diff arguments (old new) is al

Re: [Python-Dev] [Python-checkins] r87270 - python/branches/py3k/Doc/library/urllib.request.rst

2010-12-23 Thread Senthil Kumaran
On Wed, Dec 15, 2010 at 08:07:26PM +0100, antoine.pitrou wrote: > Log: > Move the urllib-inherited API to a distinguished section Distinguished: Legacy. :) -- Senthil ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/list

Re: [Python-Dev] Fault handler updated, now disabled by default

2010-12-23 Thread Victor Stinner
Le jeudi 23 décembre 2010 à 03:37 +0100, "Martin v. Löwis" a écrit : > > So, do you agree with the fault handler? Does someone want to give a > > last review because I commit it? > > It's a new feature, so regardless of whether it's correct or not > (which I haven't reviewed yet), I don't think it

Re: [Python-Dev] Fault handler updated, now disabled by default

2010-12-23 Thread Martin v. Löwis
> The fault handler is disabled by default and it is clearly separated > (eg. it doesn't touch the API of a module). Can't you make an exception > for this new feature? Ultimately, it's for the release manager to decide, so I don't need to make an exception. However, I think that special cases are

Re: [Python-Dev] Issue #8863 adds a new?PYTHONNOFAULTHANDLER?environment variable

2010-12-23 Thread Bobby Impollonia
On Wed, Dec 22, 2010 at 9:26 PM, Victor Stinner wrote: > If the kernel doesn't do that for us, I > suppose that the compiler or something else does it for us. GCC does this for you if you declare your function with __attribute__(signal). In general, the compiler doesn't know that a function will

Re: [Python-Dev] Issue #8863 adds a new?PYTHONNOFAULTHANDLER?environment variable

2010-12-23 Thread Martin v. Löwis
> Horrible or not, the existence of __attribute__(signal) seems to > indicate that this is the case on some platform, or at least was > historically. The signal attribute has an effect only on ATMEL AVR processors, according to the documentation (and according to my source grep). On other processo

Re: [Python-Dev] r87445 - python/branches/py3k/Lib/numbers.py

2010-12-23 Thread Antoine Pitrou
On Thu, 23 Dec 2010 19:41:33 +0100 (CET) eric.araujo wrote: > > def __index__(self): > -"""index(self)""" > +"""someobject[self]""" This is misleading as to what the method actually does, as you can read in the implementation: > return int(self) ___

Re: [Python-Dev] nonlocal x = value

2010-12-23 Thread Georg Brandl
Am 22.12.2010 23:11, schrieb Laurens Van Houtven: > On Sat, Dec 18, 2010 at 1:12 PM, Georg Brandl wrote: >> Am 17.12.2010 17:52, schrieb Laurens Van Houtven: >>> +1 for throwing it out of the PEP. Assignment is a thing, >>> nonlocal/global is a thing, don't mix them up :) (That in addition to >>>

Re: [Python-Dev] Fault handler updated, now disabled by default

2010-12-23 Thread Georg Brandl
Am 23.12.2010 19:23, schrieb "Martin v. Löwis": >> The fault handler is disabled by default and it is clearly separated >> (eg. it doesn't touch the API of a module). Can't you make an exception >> for this new feature? > > Ultimately, it's for the release manager to decide, so I don't need to > m

Re: [Python-Dev] nonlocal x = value

2010-12-23 Thread Laurens Van Houtven
On Thu, Dec 23, 2010 at 9:51 PM, Georg Brandl wrote: > Yes and no -- there may not be an ambiguity to the parser, but still to > the human.  Except if you disallow the syntax in any case, requiring > people to write > > nonlocal x = (3, y) > > which is then again inconsistent with ordinary assignm

Re: [Python-Dev] r87445 - python/branches/py3k/Lib/numbers.py

2010-12-23 Thread Éric Araujo
Le 23/12/2010 20:55, Antoine Pitrou a écrit : >> def __index__(self): >> -"""index(self)""" >> +"""someobject[self]""" > > This is misleading as to what the method actually does, Really? Unless I misunderstood the docs, __index__ is used when the object is used as an index (o

Re: [Python-Dev] nonlocal x = value

2010-12-23 Thread Georg Brandl
Am 23.12.2010 22:03, schrieb Laurens Van Houtven: > On Thu, Dec 23, 2010 at 9:51 PM, Georg Brandl wrote: >> Yes and no -- there may not be an ambiguity to the parser, but still to >> the human. Except if you disallow the syntax in any case, requiring >> people to write >> >> nonlocal x = (3, y) >

Re: [Python-Dev] r87445 - python/branches/py3k/Lib/numbers.py

2010-12-23 Thread Antoine Pitrou
On Thu, 23 Dec 2010 22:09:15 +0100 Éric Araujo wrote: > Le 23/12/2010 20:55, Antoine Pitrou a écrit : > >> def __index__(self): > >> -"""index(self)""" > >> +"""someobject[self]""" > > > > This is misleading as to what the method actually does, > Really? Unless I misundersto

Re: [Python-Dev] r87445 - python/branches/py3k/Lib/numbers.py

2010-12-23 Thread Martin v. Löwis
Am 23.12.2010 22:09, schrieb Éric Araujo: > Le 23/12/2010 20:55, Antoine Pitrou a écrit : >>> def __index__(self): >>> -"""index(self)""" >>> +"""someobject[self]""" >> >> This is misleading as to what the method actually does, > Really? Unless I misunderstood the docs, __inde

Re: [Python-Dev] Fault handler updated, now disabled by default

2010-12-23 Thread Martin (gzlist)
On 23/12/2010, Victor Stinner wrote: > > I tested my patch on Windows (XP), Ubuntu (10.4) and FreeBSD (8) and it > works correctly: all tests pass and the system fault handler (Windows > popup, Apport and core dump) is also called. Doesn't build for me without #ifdef HAVE_UNISTD_H in Python/fault

Re: [Python-Dev] [Python-checkins] r87458 - python/branches/py3k/Lib/gettext.py

2010-12-23 Thread Martin v. Löwis
> # "a?b:c" to "test(a,b,c)". > expr = re.compile(r'(.*?)\?(.*?):(.*)') > def repl(x): > -return "test(%s, %s, %s)" % (x.group(1), x.group(2), > - expr.sub(repl, x.group(3))) > +return "(%s if %s else %s)" % (x.group(2), x.group(1),

Re: [Python-Dev] [Python-checkins] r87458 - python/branches/py3k/Lib/gettext.py

2010-12-23 Thread Benjamin Peterson
2010/12/23 "Martin v. Löwis" : >>      # "a?b:c" to "test(a,b,c)". >>      expr = re.compile(r'(.*?)\?(.*?):(.*)') >>      def repl(x): >> -        return "test(%s, %s, %s)" % (x.group(1), x.group(2), >> -                                     expr.sub(repl, x.group(3))) >> +        return "(%s if %s

Re: [Python-Dev] [Python-checkins] r87445 - python/branches/py3k/Lib/numbers.py

2010-12-23 Thread Nick Coghlan
On Fri, Dec 24, 2010 at 4:41 AM, eric.araujo wrote: > Author: eric.araujo > Date: Thu Dec 23 19:41:33 2010 > New Revision: 87445 > > Log: > Fix small inaccuracy: there is no index function Yes, there is, it just isn't a builtin - it lives in the operator module. >     def __index__(self): > -  

Re: [Python-Dev] Fault handler updated, now disabled by default

2010-12-23 Thread Victor Stinner
Le jeudi 23 décembre 2010 à 21:59 +0100, Georg Brandl a écrit : > this thread showed that it is not at all obvious how the feature should look > like Ok, I understand. I closed #8863 (rejected) and I created a third party module on the Python cheese shop: http://pypi.python.org/pypi/faulthandler/

Re: [Python-Dev] Fault handler updated, now disabled by default

2010-12-23 Thread Victor Stinner
Le jeudi 23 décembre 2010 à 22:58 +, Martin (gzlist) a écrit : > On 23/12/2010, Victor Stinner wrote: > > > > I tested my patch on Windows (XP), Ubuntu (10.4) and FreeBSD (8) and it > > works correctly: all tests pass and the system fault handler (Windows > > popup, Apport and core dump) is al

Re: [Python-Dev] Fault handler updated, now disabled by default

2010-12-23 Thread Georg Brandl
Am 24.12.2010 03:21, schrieb Victor Stinner: > Le jeudi 23 décembre 2010 à 21:59 +0100, Georg Brandl a écrit : >> this thread showed that it is not at all obvious how the feature should look >> like > > Ok, I understand. I closed #8863 (rejected) and I created a third party > module on the Python