function get_class_name()

sismex01 at hebmex.com sismex01 at hebmex.com
Thu Mar 13 23:15:54 CET 2003


> 
> class Hello:
> 	.
> 	.
> 	def get_class_name(self):
> 		<<code>>
> 
> that does this
> 
> >>>World=Hello()
> >>>World.get_class_name()
>    "World"
> 
> Thanks 
> 
> Marco	
>

class Hello:
	def get_class_name(self):
		return self.__class__.__name__

-gustavo





More information about the Python-list mailing list