[Mailman-Users] Wonderful gmail (was: at Slayter 7pm TOMORROW Wed., FREE Beginner lesson, Live Band)

Laura Creighton lac at openend.se
Wed Sep 2 14:10:23 CEST 2015


In a message of Wed, 02 Sep 2015 11:15:43 +0100, Adam McGreggor writes:
>Is it a case of that wonderful gmail feature:
>
>    https://support.google.com/mail/answer/6588

Gmail doesn't give android users the ability to send plain text emails.

The desktop users are supposed to be able to, but it does not work
properly.  As happened recently to me, let us say you are a brand
new would-be python programmer who has a posted some complicated
code to the list, complaining that it 'doesn't work' (give the
correct answer).  I read the thing and notice that you are removing
elements from the list you are iterating over, and reply.

Simplified, you have this problem:

>>> mylist = [1, 2, 3, 4]
>>> for i in mylist:
...     mylist.pop()
>>> print mylist
[1, 2]

You need to make a copy of your list and iteratre over that.

>>> import copy
>>> mylist = [1, 2, 3, 4]
>>> mylistcopy = copy.copy(mylist)
>>> for i in mylistcopy:
...     mylist.pop()
>>> print mylist
[]

Note the series of lines beginning with '>>>'
Despite the fact that I sent the mail in plain text, and the gmail
user is also sending mail in plain text, _Gmail reserves the right to
reflow all the lines you are quoting which begin with some
number of '>'._

The conversation immediately goes to utter confusion, as people can
no longer paste in 'exactly what happened when I tried this at
the console' any more.  (Well, you can.  Only flush to the margin
matters, so my PS1 prompt is now ' >>>'.  But all the python users
on this planet should not have to change their PS1 prompts because
Google just cannot leave 'plain text' alone.

But we may be at 'friends don't let friends use gmail' time, if
not right now, then fairly soon.  Exactly how many things can you
do to break mail, Google?

Laura


More information about the Mailman-Users mailing list