Can Python learn from Perl? Perl 5 can now run Perl 6 code
Lutz Horn
lutz.horn at posteo.de
Thu Jul 28 03:33:48 EDT 2016
Hi,
Am 07/28/2016 um 09:21 AM schrieb Steven D'Aprano:
> But Perl has a feature that
> if you tell it to run a file with a hashbang line, it will call the given
> executable to run that file. That's now been improved to recognise Perl6 as an
> external executable, instead of trying to run it as Perl 5 code.
> Should Python do something similar? At least for Python 2/3 code?
Do you mean something like
#!/usr/bin/env python2.7
# here comes Python 3 code
should be run using python3, if installed? Why not just put the python3
executable into the hashbang line?
Lutz
--
https://www.lhorn.de/
https://emailselfdefense.fsf.org/de/
More information about the Python-list
mailing list