I have been working on a project that is using Google App Engine's python sdk. I was digging around in it and saw a lot of methods like this.
def _put(self, bla, bla):
do something
put = _put
Is there any reason they assign the private variable like this? I mean I don't see the point of defining a method as private and then assigning it to a non private variable. Why not just make the method its self public?
def put(self, bla, bla):
do something
The only then I can think of is it is done this way to meet some "proper coding style" rules. I mainly interested because I would like to get better at writing proper python code and wanted to know if this is something I should be doing myself?
EDIT: Thanks @falsetru for the link! Here is what I'm talking about (https://code.google.com/p/googleappengine/source/browse/trunk/python/google/appengine/ext/ndb/model.py?r=410#3340)