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

On Tue, May 24, 2016 at 12:24 PM, Frédéric Chapoton
<fchapot...@gmail.com> wrote:
> I agree with Johann's proposal, with X=1 year  as William proposed.
>
> The doc will very soon already have print() everywhere.
>
> I have contacted at least one author of the French book. They want to make a
> revised edition and an English traduction, and they will use print().
>
> Who is volunteering to write the parser ?
>
> Frederic
>
>
> Le mardi 24 mai 2016 20:52:09 UTC+2, Jori Mäntysalo a écrit :
>>
>> On Tue, 24 May 2016, Johan S. R. Nielsen wrote:
>>
>> > 1) For year, issue only a deprecation *the first time* "print a" is used
>> > in a session.
>> > 2) After that, for X years, issue a deprecation warning *every time*
>> > "print a" is used.
>> > 3) After that, remove support for "print a" completely.
>>
>> 0) For a year(?), distribute version of Sage where every example uses only
>> print(). Contact writers of Sage textbook etc.
>>
>> --
>> Jori Mäntysalo
>
> --
> 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 https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.



-- 
William (http://wstein.org)

-- 
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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to