[Python-ideas] __dir__ in which folder is this py file

Brendan Barnwell brenbarn at brenbarn.net
Mon May 7 14:23:41 EDT 2018

On 2018-05-07 09:17, Steven D'Aprano wrote:
> I'm arguing that for some people, your preferred syntax*is*  more
> distracting and hard to comprehend than the more self-descriptive
> version with named functions. And its not just a matter of*learning*
> the API, it is a matter of using it so often that it ceases to look
> weird and looks natural.[1]
> But if you think it isn't distracting, I think you are mistaken, and I
> think we ought to show caution in making it a built-in or an offical
> part of the module API.

	As an aside, this has some parallels with the recent thread about 
"objectively quantifying readability".  Saying things like "you are 
mistaken" implies that there is an objective ground truth about what is 
distracting and what is not.  And personally I agree that there is such 
an objective ground truth, and that it is based on facts about human 
pyschology (although I don't think I agree with you about this 
particular case).  Of course, there may be differences in how 
individuals react to things, but there is a real sense in which 
different syntaxes, constructs, etc., have something like a "mean level 
of confusion" which represents how easy to deal with people in general 
find them on average, and by which they can be meaningfully compared. 
I'm not sure how to proceed to uncover this (unless the PSF starts 
funding psychological experiments!), but I do think it would be good if 
we could find ways to get at something like hard evidence for claims 
about whether things "really are" distracting, readable, unreadable, 
intuitive, etc.

Brendan Barnwell
"Do not follow where the path may lead.  Go, instead, where there is no 
path, and leave a trail."
    --author unknown

More information about the Python-ideas mailing list