Message194487
I'm a bit late but I still have a few comments:
+ The paren-using form also means that when the exception arguments are
+ long or include string formatting, you don't need to use line
+ continuation characters thanks to the containing parentheses.
This paragraph doesn't add much and could be removed IMHO.
+- When binding caught exceptions to a name, prefer the explicit name
+ binding syntax added in Python 2.6::
+
+ try:
+ process_data()
+ except Exception as exc:
+ raise DataProcessingFailedError(str(exc))
It took me a bit to realize that this is talking about "as". I think it would be better to be more explicit, and simplify the example a bit so that it's not as distracting.
+ Note that in Python 3, ``unicode`` and ``basestring`` no longer exist
+ (there is only ``str``) and a bytes object is no longer a kind of
+ string (it is a sequence of integers instead)
Is there any specific reason to use "sequence of integers" instead of "sequence of bytes"? |
|
Date |
User |
Action |
Args |
2013-08-05 15:18:33 | ezio.melotti | set | recipients:
+ ezio.melotti, lemburg, gvanrossum, barry, rhettinger, terry.reedy, ncoghlan, michael.foord, tshepang, serhiy.storchaka |
2013-08-05 15:18:33 | ezio.melotti | set | messageid: <1375715913.19.0.944241478055.issue18472@psf.upfronthosting.co.za> |
2013-08-05 15:18:33 | ezio.melotti | link | issue18472 messages |
2013-08-05 15:18:32 | ezio.melotti | create | |
|