LWN.net Logo

Perl 5.16 and beyond

Perl 5.16 and beyond

Posted Mar 25, 2012 11:21 UTC (Sun) by kleptog (subscriber, #1183)
Parent article: Perl 5.16 and beyond

I something wonder where Python would be now if it had such an extensible core. The idea that you might be able to, per module, define whether you want Python 2 or Python 3 string semantics. from __future__ does some of the same work, but doesn't go far enough.


(Log in to post comments)

Perl 5.16 and beyond

Posted Mar 27, 2012 10:37 UTC (Tue) by man_ls (subscriber, #15091) [Link]

It looks like it would be a sane solution for the Python 2->3 transition mess. Not only string semantics, but to provide complete compatibility for Python 2 modules in Python 3 programs. It would be a nice way forward.

Re: What if Python had such an extensible core

Posted Jun 3, 2012 8:47 UTC (Sun) by gps (subscriber, #45638) [Link]

I don't see how this would help bridge the Python 2 <-> 3 boundary within a single program.

The real issue with doing that is the fundamental string type change; you can't magically pass data across such an interface boundary without deciding which way the types convert. Python is so dynamic that in most situations there is no definition carried around of where something came from such that a boundary crossing could be determined and enforced.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds