Descriptors: why __get__(obj,typ=None) instead of __get__(obj,typ)

Shalabh Chaturvedi shalabh at cafepy.com
Thu Feb 19 20:34:28 EST 2004


Almost everwhere the descriptor protocol is mentioned, it specifies
__get__(obj, typ=None). Why is a default value needed for the second
argument? In which case does Python call a descriptor without a second
argument?

Thanks,
Shalabh



More information about the Python-list mailing list