[Tutor] Naming Instances of Classes

Rick Pasotto rick@niof.net
Sun, 8 Apr 2001 20:56:11 -0400


On Sun, Apr 08, 2001 at 05:28:31PM -0700, Britt Green wrote:
> I have a little problem thats been vexing me for the past week. If I
> have a class, how do you name the instances of that class? In all the
> code I've seen its always been hardcoded like this:
> 
> class Employee: pass
> 
> john = Employee()
> 
> Instead of hardcoding it, how can I make my program automatically give
> a unique name or number to a new class?

How are you going to refer to it if you don't give it a name?

-- 
"Democracy is being allowed to vote for the candidate you dislike least."
		-- Robert Byrne
		   Rick Pasotto email: rickp@telocity.com