[IronPython] int, long, and null-terminated strings

Sanghyeon Seo sanxiyn at gmail.com
Sat Sep 23 03:05:56 PDT 2006


CPython has this "feature", or rather a quirk:

Python 2.4.4c0 (#2, Jul 30 2006, 15:43:58)
[GCC 4.1.2 20060715 (prerelease) (Debian 4.1.1-9)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> int('0777\0xyz', 8)
511

Of course, anyone depending on this should suffer appropriate
punishment after their death, but this *is* an incompatibility.

Annoyingly, CPython's tarfile module depends on this.

-- 
Seo Sanghyeon


More information about the users mailing list