On Dec 29, 1:53 am, Petar <[EMAIL PROTECTED]> wrote:
> Let me explain how I got to this question. I had written een Article
> class which handled the articles that I had. On a certain page I
> wanted to show all the articles. That got me wondering about what to
> do. Should I make a method in my A
On Sat, 29 Dec 2007 01:53:38 -0800, Petar wrote:
> The post of Dennis made me realize of another solution though. To
> create another class called Articles which return multiple articles.
> The only problem I forsee with this that's it's gonna be a very empty
> class.
Then maybe it should not be
On 28 dec, 19:42, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> On Fri, 28 Dec 2007 04:05:59 -0800 (PST), Petar <[EMAIL PROTECTED]>
> declaimed the following in comp.lang.python:
>
> > I was just wondering.
>
> > What if you have a 'Employees' class and you want to list all the
> > employees. Curr
Petar a écrit :
(snip)
> should a class always
> reference only on 'item'?
???
I'm afraid I didn't get this part of the question.
--
http://mail.python.org/mailman/listinfo/python-list
Petar a écrit :
> On 28 dec, 13:40, Bjoern Schliessmann [EMAIL PROTECTED]> wrote:
>
>>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
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 ful
On 28 dec, 13:40, Bjoern Schliessmann wrote:
> 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
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
I was just wondering.
What if you have a 'Employees' class and you want to list all the
employees. Currenlty i'm seeing to possibilities:
- create a 'listAll' function inside the class which returns all the
employees in a array.
- create multiple instances, putting them in a array, by calling the