Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #24988 > unrolled thread

API design question for dbf.py

Started byEthan Furman <ethan@stoneleaf.us>
First post2012-07-06 14:34 -0700
Last post2012-07-06 14:34 -0700
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  API design question for dbf.py Ethan Furman <ethan@stoneleaf.us> - 2012-07-06 14:34 -0700

#24988 — API design question for dbf.py

FromEthan Furman <ethan@stoneleaf.us>
Date2012-07-06 14:34 -0700
SubjectAPI design question for dbf.py
Message-ID<mailman.1872.1341610020.4697.python-list@python.org>
I'm looking for some free advice.  ;)

My dbf module has three basic containers, all of which support list-like 
access:  Table, List, and Index, each of which is filled with _DbfRecords.

The fun part is that a _DbfRecord can compare equal to another 
_DbfRecord, a _DbfRecordTemplate, a tuple with the same values in the 
same locations, or a dict with the same keys/fields and values.

The really fun part is __contains__:  should the __contains__ method 
return True when a _DbfRecordTemplate, tuple, or dict is looked up in 
the Table, List, or Index and there is a matching record?

~Ethan~

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web