[Python-3000] PEP 3101 str.format() equivalent of '%#o/x/X'?

2008-05-29 Thread wesley chun
hi, i'm looking to duplicate this string format operator '#' functionality with the new format(). here it is using the old string format operator: >>> i = 45 >>> 'dec: %d/oct: %o/hex: %X' % (i, i, i) # no "#" means no leading "0" >>> or "0x/X" 'dec: 45/oct: 55/hex: 2D' >>> 'dec: %d/oct:

Re: [Python-3000] PEP 3101 str.format() equivalent of '%#o/x/X'?

2008-05-29 Thread wesley chun
> wesley chun wrote: >> >> i have to resort to the uglier: >> >>> 'dec: {0}/oct: 0o{0:o}/hex: 0X{0:X}'.format(i) >> 'dec: 45/oct: 0o55/hex: 0X2D' [Nick Coghlan <[EMAIL PROTECTED]>]: > Is being explicit about the displayed prefix

Re: [Python-3000] PEP 3101 str.format() equivalent of '%#o/x/X'?

2008-05-29 Thread wesley chun
On 5/29/08, Eric Smith <[EMAIL PROTECTED]> wrote: > Marcin 'Qrczak' Kowalczyk wrote: > > Except that it works incorrectly for negative numbers. wow, that is a great point. i didn't think of this either. it makes it very inconvenient (see below) and makes it more difficult to say we've completed r

Re: [Python-3000] PEP 3101 str.format() equivalent of '%#o/x/X'?

2008-05-31 Thread wesley chun
>>> I'd be fine with adding '#' back to the formatting language for hex and oct. >> >> And bin, I assume? > > Of course. somewhat on-topic, can i hear from some of you as far as use-cases for oct() and hex() [plus bin()] in Python code? i find "%x" or "%o" (and its variants) sufficient in servin

Re: [Python-3000] Several days later: no windows installers for b3

2008-08-24 Thread wesley chun
>> No b3 installers for windows at http://www.python.org/download/releases/3.0/ > We know. Martin, who usually does the Windows installer, is on vacation. once they're ready and the page updated, also change the 1st sentence under "Download" to reflect beta (and future release candidate) status as

Re: [Python-3000] [Python-Dev] Not releasing rc1 tonight

2008-09-07 Thread wesley chun
>> Barry Warsaw wrote: >>> I'm not going to release rc1 tonight. >>> I'd like to try again on Friday and stick to rc2 on the 17th. > > There are 8 open release blockers, a few of which have patches that need > review. So I think we are still not ready to release rc1. But it worries > me because I

Re: [Python-3000] Problem with grammar for 'except'?

2008-10-05 Thread wesley chun
On Thu, Sep 4, 2008 at 12:36 PM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On Wed, Sep 3, 2008 at 9:25 PM, Raymond Hettinger <[EMAIL PROTECTED]> wrote: >> [Brett] >>> I gave a talk last night at the Vancouver Python users group on >>> 2.6/3.0, and I tried the following code and it failed during