getting all user defined attributes of a class
Marc 'BlackJack' Rintsch
bj_666 at gmx.net
Wed Feb 6 17:15:03 EST 2008
On Wed, 06 Feb 2008 14:07:23 -0800, Amit Gupta wrote:
> Class A(object) :
> self.x = 1
This is not valid Python code.
> I want something like:
> for userattrib in A.getAllUserAttribute() :
> print userattrib
>
> My question is, is there a builtin function, called
> getAllUserAttributes?
No and there can't be since the attributes you seem to be interested in
don't exist until an instance is created.
Ciao,
Marc 'BlackJack' Rintsch
More information about the Python-list
mailing list