16 Apr
2016
16 Apr
'16
12:32 a.m.
Richard Prosser wrote:
For example:
github_response = requests.get('https://api.github.com/user', auth=('user', 'pass')) # Derived from http://docs.python-requests.org/en/master.
The above request returns a |Response| http://docs.python-requests.org/en/master/api/#requests.Response object and so the variable has 'response' in its name.
Conventions like that can be useful, but only when they clarify the code, which they don't always do. Sometimes they just make it needlessly verbose and hard to read. So I would not like to see any formal use made of such a convention. -- Greg