On 06/11/15 11:57, Daniel Krenn wrote:
On 2015-11-06 07:32, Jeroen Demeyer wrote:
On 2015-11-06 12:27, Jori Mäntysalo wrote:
1) Should we raise ValueError("Bad things happened.") or ValueError("bad
things happened")? There are 3559 error of the former form and 4150 of
the latter.
Python recommends the second style.
Can you provide a reference for this? (I've tried to find, but didn't)
$ python
Python 2.7.9 (default, Mar 1 2015, 12:57:24)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> [0,1,2][5]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
IndexError: list index out of range
>>> [0,1,2]['a']
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: list indices must be integers, not str
--
You received this message because you are subscribed to the Google Groups
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.