comparison dataset.py @ 132:f6505ec32dc3

Updated documentation slightly
author Joseph Turian <turian@gmail.com>
date Thu, 08 May 2008 00:54:14 -0400
parents ee5507af2c60
children 3f4e5c9bdc5e
comparison
equal deleted inserted replaced
131:57e6492644ec 132:f6505ec32dc3
67 for example_value in field_examples: 67 for example_value in field_examples:
68 ... 68 ...
69 but when the dataset is a stream (unbounded length), it is not recommanded to do 69 but when the dataset is a stream (unbounded length), it is not recommanded to do
70 such things because the underlying dataset may refuse to access the different fields in 70 such things because the underlying dataset may refuse to access the different fields in
71 an unsynchronized ways. Hence the fields() method is illegal for streams, by default. 71 an unsynchronized ways. Hence the fields() method is illegal for streams, by default.
72 The result of fields() is a DataSetFields object, which iterates over fields, 72 The result of fields() is a L{DataSetFields} object, which iterates over fields,
73 and whose elements are iterable over examples. A DataSetFields object can 73 and whose elements are iterable over examples. A DataSetFields object can
74 be turned back into a DataSet with its examples() method:: 74 be turned back into a DataSet with its examples() method::
75 dataset2 = dataset1.fields().examples() 75 dataset2 = dataset1.fields().examples()
76 and dataset2 should behave exactly like dataset1 (in fact by default dataset2==dataset1). 76 and dataset2 should behave exactly like dataset1 (in fact by default dataset2==dataset1).
77 77