For the future, at least

I happen to be teaching essential std lib modules this week, i had a headache with how naming goes on (i was looking at how a beginner would learn).   Poor me, what could be an intuitive learning journey has some clogs down the road.

Abdur-Rahmaan Janhangeer |

On Thu, 28 Nov 2019, 14:57 Steven D'Aprano, <> wrote:
On Thu, Nov 28, 2019 at 02:06:08PM +0400, Abdur-Rahmaan Janhangeer wrote:
> It's about ambiguity. Maybe loads is short for load string which in english
> is also a verb.

True. It took me a long time to stop getting confused between
pickle.load and .loads until I stopped reading it as "loads" and started
reading it as "load-s(tring)".

I agree with you that this is a sub-optimal naming convention, and we
would have been better if a different choice was made at the beginning.
But unfortunately it is a widely used naming convention:

    * pickle
    * marshall
    * json
    * yaml (I think)
    * and probably more

and not just in Python. But I agree with the others that the pain and
disruption from changing it is greater than the benefit. We all just
have to memorise that "loads" means "load-string" and not the present
tense of load.

Python-ideas mailing list --
To unsubscribe send an email to
Message archived at
Code of Conduct: