Message233961
| Author |
mark.dickinson |
| Recipients |
geoffreyspear, luisgf, mark.dickinson |
| Date |
2015年01月13日.19:33:04 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1421177584.35.0.60889859111.issue23230@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
> is a base-10 zero padded comming from the parsing of a ip string
If you're parsing an ip string, how do you end up with a 000 *literal*? The SyntaxError only applies to literals in Python code; it doesn't affect conversion from strings to integers. So you don't need the "base=10" keyword: the following works in both Python 2 and Python 3.
>>> int("000")
0
>>> int("0019")
19 |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2015年01月13日 19:33:04 | mark.dickinson | set | recipients:
+ mark.dickinson, geoffreyspear, luisgf |
| 2015年01月13日 19:33:04 | mark.dickinson | set | messageid: <1421177584.35.0.60889859111.issue23230@psf.upfronthosting.co.za> |
| 2015年01月13日 19:33:04 | mark.dickinson | link | issue23230 messages |
| 2015年01月13日 19:33:04 | mark.dickinson | create |
|