A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2001-April/103707.html below:

Method to give name of class instance?

Method to give name of class instance? Method to give name of class instance?Timothy L. Robertson timothyr at timothyr.com
Sun Apr 29 20:22:53 EDT 2001
Hi Everyone,

I've been enjoying learning Python very much, but have hit a little
snag.  I want a way to find out the name of a class instance from a
method.  eg.

>>>classinstance=MyClass()
>>>classinstance.myname()
'classinstance'

Is there a way to do this?

Thanks,
-Tim
timothyr at timothyr.com

More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4