OOP: How to implement listing al 'Employees'.
Bruno Desthuilliers
bruno.42.desthuilliers at wtf.websiteburo.oops.com
Fri Dec 28 08:38:05 EST 2007
Bjoern Schliessmann a écrit :
> Petar wrote:
>> What is the better way of doing this? And should a class always
>> reference only on 'item'?
>
> It fully depends on what you want to do in your program. If you just
> want to have a list of employees, a list or dict will suffice. If
> you need a full-fledged employee database, an "Employees" class may
> be a good API.
If you need a full-fledged employee database, a RDBMS may be a good API.
And if you insist on having it the OO way, have a look at SQLAlchemy.
My 2 cents...
More information about the Python-list
mailing list