On 01/16/2014 04:49 AM, Michael Urman wrote:
On Thu, Jan 16, 2014 at 1:52 AM, Ethan Furman <et...@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~
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to