Re: Moving object on page leaves afterimage on Python 3 but not on 2

Reinis Danne <[email protected]>
Newsgroups gmane.comp.python.tkinter
Message-ID <[email protected]>
On Fri, Feb 05, 2016 at 10:03:51PM +0530, Bhaskar Chaudhary wrote:
> Hi Reinis Danne
> 
> I am not sure if this is exactly the cause of your problem, but
> map() returns a list in Python 2 but an iterator  in Python 3.
> 
> You can place a list around map() like:
>    list(map(self.paper.delete, items))
> to ensure that the result is still a list and has the same behavior in
> both Python 2 and 3.
> 
> Another difference is that in Python 2 map() continues until the items
> in the longest of the iterator is exhausted, extending the other
> arguments with None. In Python 3 this is not the case, a similar
> behavior can be achieved using itertools.zip_longest.
> 
> So I guess, your problem is related to one of the above two issues.
> 
> BTW, really nice program there you have built.

Thanks! But I'm only a lowly maintainer and porting to Python 3.
The credit for writing BKChem goes to Beda Kosata.


Reinis
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.