Re: [Python-3000] how should we handle changes to the C API?

2007-02-14 Thread Martin v. Löwis
Brett Cannon schrieb: > It doesn't need to, it just would have been convenient and consistent. > It seems odd that C code can compare an exception against other > objects that an 'except' clause won't. If you look at the C code, you find that there are very few callers to GivenExceptionMatches (e

[Python-3000] fixing test_dict

2007-02-14 Thread Eduardo \"EdCrypt\" O. Padoan
If someone is alread working at this, please ignore this mail: I just picked because it was ease enough not to do while I wait some other code to run at work. I've created two patches to p3yk. They are two alternatives to fix the broken test_dict.py: test_dict_1.patch uses the same approach as tes

Re: [Python-3000] fixing test_dict

2007-02-14 Thread Guido van Rossum
Thanks! I decided to use your first approach; one can never have too many unit tests! :-) On 2/14/07, Eduardo EdCrypt O. Padoan <[EMAIL PROTECTED]> wrote: > If someone is alread working at this, please ignore this mail: I just > picked because it was ease enough not to do while I wait some other >

Re: [Python-3000] how should we handle changes to the C API?

2007-02-14 Thread Brett Cannon
On 2/14/07, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > Brett Cannon schrieb: > > It doesn't need to, it just would have been convenient and consistent. > > It seems odd that C code can compare an exception against other > > objects that an 'except' clause won't. > > If you look at the C code,

Re: [Python-3000] pre-PEP: Default Argument Expressions

2007-02-14 Thread BJörn Lindqvist
On 2/14/07, Josiah Carlson <[EMAIL PROTECTED]> wrote: > > Chris Rebert <[EMAIL PROTECTED]> wrote: > > Requesting comments on the following pre-PEP. pybench runs both with and > > without the patch applied would also be appreciated. > > - Chris R > > One Glyph Lefkowitz posted today [1] in response

Re: [Python-3000] pre-PEP: Default Argument Expressions

2007-02-14 Thread Greg Ewing
BJörn Lindqvist wrote: > I have many, MANY times written bugged code like this: > > def something(x = None): > if not x: > x = 42 # <- Oh noe! You can get exactly the same bug in many other contexts besides default arguments. It's something you need to be on the alert

Re: [Python-3000] pre-PEP: Default Argument Expressions

2007-02-14 Thread Josiah Carlson
"BJörn Lindqvist" <[EMAIL PROTECTED]> wrote: > On 2/14/07, Josiah Carlson <[EMAIL PROTECTED]> wrote: > > Chris Rebert <[EMAIL PROTECTED]> wrote: > > > Requesting comments on the following pre-PEP. pybench runs both with and > > > without the patch applied would also be appreciated. > > > - Chris R

Re: [Python-3000] pre-PEP: Default Argument Expressions

2007-02-14 Thread Guido van Rossum
Nobody has asked me yet, but I'm not going to support this PEP. it's too big a departure from existing semantics. Next are we going to turn class variables initialized with expressions into automatic instance variable initializers implicitly executed in the __init__ code? Newbies are just as likely

Re: [Python-3000] pre-PEP: Default Argument Expressions

2007-02-14 Thread Chris Rebert
Mike Klaas wrote: > On 2/13/07, Chris Rebert <[EMAIL PROTECTED]> wrote: >> This PEP proposes new semantics for default arguments to remove >> boilerplate code associated with non-constant default argument >> values, >> allowing them to be expressed more clearly and succinctly. >> Sp

Re: [Python-3000] pre-PEP: Default Argument Expressions

2007-02-14 Thread Chris Rebert
Josiah Carlson wrote: > "BJörn Lindqvist" <[EMAIL PROTECTED]> wrote: >> On 2/14/07, Josiah Carlson <[EMAIL PROTECTED]> wrote: >>> Chris Rebert <[EMAIL PROTECTED]> wrote: Requesting comments on the following pre-PEP. pybench runs both with and without the patch applied would also be apprec

[Python-3000] UserDict revamp

2007-02-14 Thread Guido van Rossum
I tried to fix a few more unit tests tonight that had started failing after the introduction of dict views. Looking over UserDict.py, it's clear that this module needs more work -- while I banged it into submission with minimal effort, it would reallly make a lot more sense to redesign UserDict and

Re: [Python-3000] pre-PEP: Default Argument Expressions

2007-02-14 Thread Greg Ewing
I just noticed that my Thunderbird marked the posting with this PEP in it as spam. Not sure what that says about the proposal... -- Greg ___ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: