allow compute fields to depend on compute fields defined earlier, thanks Tim Richardson
This commit is contained in:
2
VERSION
2
VERSION
@@ -1 +1 @@
|
||||
Version 2.5.1-stable+timestamp.2013.06.21.06.43.49
|
||||
Version 2.5.1-stable+timestamp.2013.06.21.10.15.15
|
||||
|
||||
@@ -8541,9 +8541,8 @@ class Table(object):
|
||||
for name,ofield in to_compute:
|
||||
# try compute it
|
||||
try:
|
||||
new_fields[name] = (ofield,ofield.compute(row))
|
||||
__,fields[name] = new_fields[name] #the value is the second element of the tuple
|
||||
row = Row(fields) #allow later compute fields to refer to this value
|
||||
row[name] = new_value = ofield.compute(row)
|
||||
new_fields[name] = (ofield, new_value)
|
||||
except (KeyError, AttributeError):
|
||||
# error silently unless field is required!
|
||||
if ofield.required:
|
||||
|
||||
Reference in New Issue
Block a user