On Wed, 11 Nov 2015 1:33 AM <[email protected]> wrote: Oh ok, i get it now. thanks Justin. Would that garbage list be bad because it takes up memory or compute time or just bad programming practice?
a, b, and c :-) If map() didn't return anything, then it would be fine. Also in python3, map() is now a generator (like itertools.imap). So your usage would end up breaking. The generator returned from that version of map() would have to be looped over, completely, to have it apply the function to every item and get your side effect. But if you throw away the resulting generator, nothing happens http://xahlee.info/python/python3_map_with_side_effect.html thanks, last time, Sam;) -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/0f7b5430-dfcb-4285-8974-e575e9475311%40googlegroups.com . For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0tA8a2h-wVz1MJuc7cAtHY18DYs8XsAFwc4Nj0kceT6A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
