Naming class instances in real time

Neil MacMillan neil at maxwell.bc.ca
Mon Aug 12 18:43:42 CEST 2002


On Mon, 12 Aug 2002 19:46:07 +0000, Fredrik Lundh wrote:

*snip*
>> Can I then have a limited but unknown number of instances of that class
>> in a running program named:
>>
>> >>>person0 = People()
>> >>>person1 = People()
>> >>>person2 = People()
> 
> why not do like everyone else, and put your instances in a list?

Because I've never been formally taught a programming language
(discounting bits of Pascal in high school); I figured out the basics of 
how OOP works yesterday; and therefore I don't *know* what everybody else 
does.  Hence, the question.  Thank you for telling me, though, I 
appreciate it.

Neil M.



More information about the Python-list mailing list