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

Shalabh Chaturvedi shalabh at cafepy.com
Fri Feb 20 02:34:28 CET 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