forked from syndicate-lang/preserves
Record.__getitem__
This commit is contained in:
parent
1fd763cf56
commit
870da87350
|
@ -75,6 +75,9 @@ class Record(object):
|
|||
for f in self.fields:
|
||||
encoder.append(f)
|
||||
|
||||
def __getitem__(self, index):
|
||||
return self.fields[index]
|
||||
|
||||
@staticmethod
|
||||
def makeConstructor(labelSymbolText, fieldNames):
|
||||
return Record.makeBasicConstructor(Symbol(labelSymbolText), fieldNames)
|
||||
|
|
Loading…
Reference in New Issue