On Mon, Dec 30, 2013 at 10:14 AM, William Stein <wst...@gmail.com> wrote:
> This discussion on Hacker News is relevant to "The Annual Sage on > Python 3 Thread" > > https://news.ycombinator.com/item?id=6985207 > > http://alexgaynor.net/2013/dec/30/about-python-3/ > > 1. Argument against switching now: > > One quote from the HN discussion: "My last few Python projects have > started out as Python 3, but ended up as 2 due to missing library > support." The takeaway for me is that even if we could easily just > switch Sage to Python 3, it's not 100% clear that we actually should > do so today. Doing so could alienate users, and restrict the > third-party code and packages that can be installed into Sage. For > example, we might see "I started out using Sage (which uses Python 3), > but had to switch to Numpy/Scipy/etc. and Python 2 due to missing > library support. Anyway, I wanted to point this out loud and clear > in case anybody on the list has been silently worrying about this. > > 2. Argument for switching now: > > On the other hand, the main suggestion in the discussion there for how > to fix this situation is to get all the popular Linux distros to > switch to Python3. Sage is like a linux distro, in that if we switch > it would help move things along. Also, Sage isn't meant to be > mainly a "python platform", but an "alternative to Mathematica/etc." > platform. > > To me personally, a killer feature I really like in Python3 is the > massively improved unicode support. I don't personally use it, but I > think it makes Sage much, much more palatable to the international > community, who like to write code like the following, which was sent > to me by Ширшов Андрей in Russia, who just one first prize in a > contest there for applying Sage to ship-building: > > #Sage variable names can be only in Latin characters > numbers=[1,2,3.5] > strings=["alpha", "beta", "gamma"] > names=["Зоя", "Яна", "Кит"] > > второе_имя="Яна" > > print(numbers) > print(strings) > print(names) > if второе_имя in names: > print("Второе имя в списке %s" % второе_имя) > > > According to > http://stackoverflow.com/questions/2649544/unicode-identifiers-in-python > this will never work in Python2 no matter what you do, but it does > work fine with python3. So you can put the above in a file cyr.py, > and type "python3 cyr.py", and it works. > > I look at analytics a lot, and the distribution of Sage users is very > world-wide, with a lot from non-native-English countries, and some of > them would really appreciate being able to name their variables using > their own language. In Mathematica (I just checked), there's no > problem at all with unicode identifiers, so far as I can tell. So > from the Sage mission statement -- "create a viable alternative to the > Ma's" -- it seems critical to our goals to switch to Python 3. > > William > I don't think that we are quite there with switching. For starters we need both scons and polybori to be updated to support python 3, but beyond that, the Sage library needs a massive amount of work to make it Python 3 compatible. Moreover, I don't think we have to force the switch, it should be perfectly possible to support both python 2 and python 3 for a period of time. -- Andrew -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/groups/opt_out.