[Python-Dev] How long the wrong type of argument should we limit (or not) in the error message (C-api)?

Stephen J. Turnbull stephen at xemacs.org
Mon Dec 16 07:37:12 CET 2013


Steven D'Aprano writes:

 > That's a good point, but I think most coders would have a very fuzzy 
 > idea of the difference between type(obj).__name__ and 
 > obj.__class__.__name__, and when to use one versus the other.

 > Likewise, I think that most of the time it is useful to distinguish 
 > between instances and classes, metaclasses not withstanding.

To me trying to handle all of those distinctions in a single format
code sounds like way confusing magic (and probably will fail to DWIM
way too often).



More information about the Python-Dev mailing list