Re: [Python-3000] else Versus or (Was: Re: default argument surprises)

2008-08-27 Thread Mike Meyer
On Wed, 27 Aug 2008 01:15:48 -0400 Eric Astor <[EMAIL PROTECTED]> wrote: > True, but 'else' can be a more specific operator, so that > >>> arg = arg else bar > is equivalent to: > >>> if arg is None: arg = bar, Yes, but only because you used arg twice. Dealing with the general case clarifies thing

Re: [Python-3000] default argument surprises

2008-08-27 Thread Alex Martelli
On Wed, Aug 27, 2008 at 2:27 PM, Nick Coghlan <[EMAIL PROTECTED]> wrote: ... > Late binding default arguments would do some fairly bad things to nested > functions such as preventing the use of class attributes when defining They'd also be SERIOUSLY problematic wrt a VERY common issue -- one th

Re: [Python-3000] XML as bytes or unicode?

2008-08-27 Thread Greg Ewing
Stefan Behnel wrote: In the absence of information provided by an external transport protocol (e.g. HTTP or MIME), it is a fatal error for an entity including an encoding declaration to be presented to the XML processor in an encoding other than that named in the declaration [...] But if the X

Re: [Python-3000] default argument surprises

2008-08-27 Thread Nick Coghlan
Chris Rebert wrote: > On Wed, Aug 27, 2008 at 11:01 AM, Brett Cannon <[EMAIL PROTECTED]> wrote: >> On Wed, Aug 27, 2008 at 9:29 AM, Sam Bishop <[EMAIL PROTECTED]> wrote: >>> On Tue, Aug 26, 2008 at 8:31 PM, Chris Rebert <[EMAIL PROTECTED]> wrote: You might then be interested in the following r

Re: [Python-3000] default argument surprises

2008-08-27 Thread Chris Rebert
On Wed, Aug 27, 2008 at 11:01 AM, Brett Cannon <[EMAIL PROTECTED]> wrote: > On Wed, Aug 27, 2008 at 9:29 AM, Sam Bishop <[EMAIL PROTECTED]> wrote: >> On Tue, Aug 26, 2008 at 8:31 PM, Chris Rebert <[EMAIL PROTECTED]> wrote: >>> You might then be interested in the following related discussions from >

Re: [Python-3000] default argument surprises

2008-08-27 Thread Brett Cannon
On Wed, Aug 27, 2008 at 9:29 AM, Sam Bishop <[EMAIL PROTECTED]> wrote: > On Tue, Aug 26, 2008 at 8:31 PM, Chris Rebert <[EMAIL PROTECTED]> wrote: >> You might then be interested in the following related discussions from >> last year wherein I proposed something extremely similar: >> >> [Python-idea

Re: [Python-3000] XML as bytes or unicode?

2008-08-27 Thread Stefan Behnel
Guido van Rossum wrote: > 2008/8/24 "Martin v. Löwis" <[EMAIL PROTECTED]>: >> Parsing Unicode XML strings isn't quite that meaningful. > > Maybe not according to the XML standard, but I can see lots of > practical situations where the encoding is always known and applied by > some other layer, i.e

Re: [Python-3000] default argument surprises

2008-08-27 Thread Sam Bishop
On Tue, Aug 26, 2008 at 8:31 PM, Chris Rebert <[EMAIL PROTECTED]> wrote: > You might then be interested in the following related discussions from > last year wherein I proposed something extremely similar: > > [Python-ideas] proto-PEP: Fixing Non-constant Default Arguments > http://mail.python.org/