>Thus we loop over each item in the class dict and only append them to the list if they are not callable (i.e. not methods). Pretty slick and it doesn’t require any imports! But there’s an even easier way!
Actually, objects can be callable by implementing the __call__ method. The inspect.ismethod() is the better solution
1 comment
[ 4.3 ms ] story [ 10.4 ms ] threadActually, objects can be callable by implementing the __call__ method. The inspect.ismethod() is the better solution