On Wednesday, July 5, 2023 at 10:50:36 AM UTC-4 Edward K. Ream wrote:

On Wed, Jul 5, 2023 at 8:48 AM Thomas Passin <[email protected]> wrote:

As for your expression paths = list(reversed([z.h for z in 
p.self_and_parents()])),

 

there is no need  to cast it to a list.


This is the second time you have made this mistaken assertion. reversed is 
a generator:

print(reversed(['a', 'b']))

<list_reverseiterator object at 0x00000218572299C0>


Aargh!  My mind is still stuck in Python 2! [pounds head on desk].  
Although list.reverse() does not change a list into a generator (although 
it doesn't return anything, just changes the list in place)

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" 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/leo-editor/2e123ea2-6704-4fc6-9302-93c5f813ef89n%40googlegroups.com.

Reply via email to