Introspection

msj@infoserv.dk martinskou2 at gmail.com
Wed Jan 6 09:53:40 EST 2010


I'm looking for a way to make a list of string literals in a class.

Example:

class A:
   def method(self):
       print 'A','BC'

>>> ExtractLiterals(A)
['A','BC']

Is this possible? Can anyone point me in the right direction?

Thanks.

/Martin



More information about the Python-list mailing list