Re: Does os.path relpath produce an incorrect relative path?

2023-05-26 Thread cactus
On Thursday, 25 May 2023 at 17:57:21 UTC+1, MRAB wrote: > On 2023-05-25 16:53, Eryk Sun wrote: > > On 5/25/23, BlindAnagram wrote: > >> > >> vcx_path = 'C:\\build.vs22\\lib\\lib.vcxproj' > >> src_path = 'C:\\lib\\src\\' > >> rel_path = '..\\..\\..\\lib\\src' > >> > >> [snip] > >> > >> The fi

Re: comprehension parsing

2022-11-05 Thread cactus
On Saturday, 5 November 2022 at 16:06:52 UTC, cactus wrote: I should have quoted the full comprehensions: all((srt(m, n) in c_np) == (srt(a, b) in c_ap) for (m, a), (n, b) in combinations(na8, 2)) all( srt(m, n) in c_np == srt(a, b) in c_ap) for (m, a), (n, b) in combinations(na8, 2

comprehension parsing

2022-11-05 Thread cactus
The two comprehensions: all((srt(n, m) in c_np) == (srt(a, b) in c_ap) for (m, b) in na) all( srt(n, m) in c_np == srt(a, b) in c_ap for (m, b) in na) parse differently but I am unclear what the second one produces since I thought it would be the same as the first. Any ideas how the second

Re: Declaring variables from a list

2005-04-09 Thread Cactus
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > "Cactus" wrote: > > > If I got a list is it possible to declare a variable from the items in that > > list? > > > > Code Sample: > > Blob = [&

Declaring variables from a list

2005-04-08 Thread Cactus
Hi, If I got a list is it possible to declare a variable from the items in that list? Code Sample: Blob = ['Var1', 'Var2', 'vAR3'] i = 5 for listitems in Blob: i += 1 listitems = i print Var1 6 print Var2 7 print vAR3 8 Something like that? This doesn't work (obviously) but is the