Hi,
I've been thinking more, and I'm really disturbed by this piecemeal
approach to getting Python 3, as least as far as it impacts *users*
(for developers it is great).
As mentioned before, I've been writing tons of code using Python 3 for
the last two weeks. There are *many* subtle ways in which this
python2 --> python3 switch will flat out break people's code/brains,
which go far beyond just the print statement. Frankly, I think
trying to gently migrate *end users/college teachers* in multiple
steps is just going to make matter worse.
For example, I'm finally using print as a function. Cool. Now (this
just happened a minute ago), I write:
[blah... for a,b in x.iteritems()]
where x is a dictionary. This is/was the optimal way to iterate over
the key/values of a dictionary in Python2. In Python3, iteritems is
just completely gone. There's surely tons of other things like this.
We need a real strategy for migrating users to Python3, and definitely
not some half-way thing that deals only with the print statement.
** If we break compatibility in the *slightest* for Python3, I think
it should only happen *once*. **
The last thing we want is:
- I upgraded to Sage-7.3 and *all* my 100s of worksheets I use in
teaching broke due to print statements. I spent 10 hours going
through and fixing them all -- ugh. Misery.
Then...
- I upgraded to sage-7.5 and all my code broke again due to (some
other python3 feature we enable)... I spent 10 hours going through
and fixing them all -- ugh. Misery and pain.
Then...
- I upgraded to Sage-8.0 and all my code broke badly again due to
Sage switching to Python3! I spent hours rewriting my code a third
time, running scripts (like the 2-to-3 convertor, but preparser
aware?), etc.
If we are going to force users to rewrite everything to work, then
let's do it all at once, rather than multiple times. And automate it
as much as possible.
Because of SageMathCloud, I know for a fact that lots of teachers
write lots of code using Jupyter notebooks and Sage worksheets, which
of course has print statements all over and other python2-isms. They
don't have the time to deal with stuff like this. If anything
involving maintaining their work takes "10 hours", they will like just
not do it ever. If they use SMC, I'll probably just make it so they
can stay with sage-7.2 "forever", just like people stick with gap3 and
python2 forever. However, if we make switching from Python2 to
Python3 trivial/smooth/easy for end users, they'll all switch no
problem and love it.
-- William
> --
> 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+...@googlegroups.com.
> To post to this group, send email to
sage-...@googlegroups.com.
William (
http://wstein.org)