On 01/16/2014 04:49 AM, Michael Urman wrote: > On Thu, Jan 16, 2014 at 1:52 AM, Ethan Furman <ethan at stoneleaf.us> wrote: >>> Is this an intended exception to the overriding principle? >> >> >> Hmm, thanks for spotting that. Yes, that would be a value error if anything >> over 255 is used, both currently in Py2, and for bytes in Py3. As Carl >> suggested, a little more explanation is needed in the PEP. > > FYI, note that str/unicode already has another value-dependent > exception with %c. I find the message surprising, as I wasn't aware > Python had a 'char' type: > >>>> '%c' % 'a' > 'a' >>>> '%c' % 'abc' > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > TypeError: %c requires int or char Python doesn't have a char type, it has str's of length 1... which are usually referred to as char's. ;) -- ~Ethan~
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4