[docs] Minor tweak to compile() documentation...
Georg Brandl
georg at python.org
Sat Sep 17 20:39:49 CEST 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Am 15.09.2011 18:03, schrieb Mike Meyer:
> It might be worth pointing out that the builtin "compile" function will
> fail with a syntax error if you feed it text with DOS line endings.
>
> This is almost certainly a very rare problem, but when it does bite you,
> it's a pita to figure out. You can run the file just fine. You can import
> it and invoke callable's from it just fine. But if you try and
> read()/compile() it, it won't work unless you open'ed it in text mode -
> even on Unix. And the error location is liable to just add to the
> confusion.
>
> Improving the error message might be a better solution (I only checked on
> 3.1), but I suspect this is rare enough that a note in the documentation
> will suffice.
Hi Mike,
this is indeed fixed on 2.7 and 3.2. We don't touch 3.1 documentation anymore,
so the solution is to simply upgrade :)
cheers,
Georg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
iEYEARECAAYFAk506XUACgkQN9GcIYhpnLAfeACdFTiWPURxDMeeNQwt06BB5es1
KAEAmgO4Jo5Kg1oKhCoCjq2M2XgPz2YL
=YmKK
-----END PGP SIGNATURE-----
More information about the docs
mailing list