another interesting point. below is code, updated from above, with both the "looped" and the "comprehension" sections active. the "looped" loads the list in natural order and the "comprehension" loads the list in the reverse. but both Rows return their version in the natural order. that should not be. coupling that to the first script I submitted, Rows() does not create a new separate and independent instance of the object even though the two instances occupy separate memory spaces.
#!/usr/bin/env python
#coding: utf-8
#> xattr -d com.apple.quarantine pydal_row_rows.py
from pydal.objects import Row, Rows
print('opening words.. .')
words = [('the', 26380), ('and', 20367), ('of', 18240), ('to', 15560), ('in', 10501), ('you', 8890), ('a', 7734), ('for', 7691), ('he', 7152), ('lord', 7075), ('i', 6173), ]
print('opened.')
r = Row({'word':words[0][0], 'N':words[0][1]})
print(type(r), r)
print(r.word, r.N, r['word'], r['N'])
print()
print('looped.. .')
qWords1 = Rows()
for w in words[::+1]:
qWords1.append(Row({'word':w[0], 'N':w[1]}))
print(type(qWords1), len(qWords1), 'addr:', hex(id(qWords1)))
for i, w in enumerate(qWords1):
print(i, w.word, w.N, w['word'], w['N'])
print('done.')
print()
print('comprehension.. .')
qWords2 = Rows([ Row({'word':w[0], 'N':w[1]}) for w in words[::-1] ])
print(type(qWords2), len(qWords2), 'addr:', hex(id(qWords2)))
for i, w in enumerate(qWords2):
print(i, w.word, w.N, w['word'], w['N'])
print('done.')
exit()