Changes

no edit summary
Line 34: Line 34:  
I grepped for imports on both sugar and sugar-toolkit-gtk3. A few of the modules have been renamed/relocated in python 3, but all of them are available, except for telepathy-python which as I have already said, I will be porting in the coming week.   
 
I grepped for imports on both sugar and sugar-toolkit-gtk3. A few of the modules have been renamed/relocated in python 3, but all of them are available, except for telepathy-python which as I have already said, I will be porting in the coming week.   
   −
My project would introduce no new features at all, but it would make sugar future ready and also backwards compatible. It might make development/maintenance harder on the core libraries in the short term, because the developers would need to understand the polyglot written using six. But it would provide long-term benefits and a wider potential future developer reach.
+
Something like
 +
import six
 +
from six.moves import configparser
 +
from six.moves import html_parser
 +
from six.moves import xmlrpc_client
 +
 
 +
would import configparser, htmlparser and xmlrpc client(which are some of the modules that I found were relocated in python 3) in both python 2 and 3.
 +
Of course just try, except blocks will work just the same, but that code would just feel hacky and ugly. Not to mention that six provides a whole host of other [https://pythonhosted.org/six/ features] than just wrap around relocated libraries.
 +
 
 +
My project would introduce no new features at all, but it would make sugar future ready and also backwards compatible. It might actually make development/maintenance harder on the core libraries in the short term, because the developers would need to understand the polyglot written using six or ad-hoc polyglot. But it would provide long-term benefits and a wider potential future developer reach.
     
26

edits