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 http://www.pythonmembers.club | https://github.com/Abdur-rahmaanJ Mauritius On Thu, 28 Nov 2019, 14:57 Steven D'Aprano, <st...@pearwood.info> 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. > > > -- > Steven > _______________________________________________ > Python-ideas mailing list -- python-ideas@python.org > To unsubscribe send an email to python-ideas-le...@python.org > https://mail.python.org/mailman3/lists/python-ideas.python.org/ > Message archived at > https://mail.python.org/archives/list/python-ideas@python.org/message/FVP522GAT6EMIZP36BKRULCXCJCUEHCC/ > Code of Conduct: http://python.org/psf/codeofconduct/ >
_______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/7ATKEJ55WPT24UJKXBIKPEQUAOLJI2Y7/ Code of Conduct: http://python.org/psf/codeofconduct/