Hacker News new | past | comments | ask | show | jobs | submit login

Python is mostly strongly typed. You can get a mix of floats and ints from e.g. parsing JSON, but your library's authors must have been pretty explicit on wanting to confuse strings with numbers.



I know, I was surprised too. But I guess if it comes in as a number from the get-go, it will simply continue as a number until we tried to slice it or something, which made the deployer abort. :)


I mean, of course the library in question could contain something like this:

    try:
        hash = int(raw_hash)
    except ValueError:
        hash = raw_hash
But WHY? Can you think of something one could do accidentally to achieve the same effect?


Maybe a migration from SVN and some legacy code somewhere. Since revisions will have r12345678 kind of format.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: