View Single Post
Old 05-14-2019, 09:12 PM   #3431
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by JimmXinu View Post
- Removing filter()/map() calls--not consistent between Py2/Py3.
Actually this is not strictly true, they create iterables on py3 and `for i in iterable` works, as does `' '.join(iterable)`. What doesn't work is len(iterable) or iterable[0], and in many, but not all cases, FanFicFare needs to save variables that will later be consumed that way -- but the difference between py2 and py3 is that py2's map() is py3's list(map()).

That being said, there are many who would say filter is un-pythonic. It's sort of a bikeshed issue whether to surround everything with list() or replace it with list comprehensions.

Last edited by eschwartz; 05-14-2019 at 09:15 PM.
eschwartz is offline   Reply With Quote