I think the point is that the encoding may be embedded in the file as a coding comment and there's no obvious way to deal with that.
Top-posted from my Windows Phone ________________________________ From: Greg Ewing<mailto:greg.ew...@canterbury.ac.nz> Sent: 6/14/2014 16:19 To: python-dev@python.org<mailto:python-dev@python.org> Subject: Re: [Python-Dev] Criticism of execfile() removal in Python3 Fabio Zadrozny wrote: > Well, I must say that the exec(open().read()) is not really a proper > execfile implementation because it may fail because of encoding > issues... It's not far off, though -- all it needs is an optional encoding parameter. -- Greg _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/steve.dower%40microsoft.com
_______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com