Probably a stupid question... name-->method lookup

Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Thu Aug 23 00:32:27 CEST 2001


Wed, 22 Aug 2001 21:30:51 GMT, Joseph Andrew Knapka <jknapka at earthlink.net> pisze:

>> >>> eval('B.%s' % 'a')
>> <unbound method A.a>
> 
> Yes, this is quite nice, thanks :-)

It's not nice!!!

IMHO eval should be avoided. In Python it almost always can be avoided.

-- 
 __("<  Marcin Kowalczyk * qrczak at knm.org.pl http://qrczak.ids.net.pl/
 \__/
  ^^                      SYGNATURA ZASTĘPCZA
QRCZAK



More information about the Python-list mailing list