Simple question, how can i create a record?

David M. Cook davecook at nowhere.net
Mon Mar 3 07:56:34 CET 2003


In article <1046608880.565095 at seux119>, EleKtR0 wrote:

> How can i create records on Python?

Use dictionaries

r = {}
r['foo'] = 5
r['bar'] = 2

or objects

class Record: pass
r = Record()
r.foo = 5
r.bar = 2

Dave Cook




More information about the Python-list mailing list