Re: Creating A Pythonic API Binding

2016-06-08 Thread Steven D'Aprano
On Wednesday 08 June 2016 12:31, Lawrence D’Oliveiro wrote: > The wrong way: [...] > The right way : That's quite good. A few minor issues: I don't understand why you have a method that returns files called "get_children". And I would expect that if you passed a

Creating A Pythonic API Binding

2016-06-07 Thread Lawrence D’Oliveiro
The wrong way: ldo@theon:~> python2 Python 2.7.11+ (default, May 9 2016, 15:54:33) [GCC 5.3.1 20160429] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import pymtp >>> mtp = pymtp.MTP() >>> mtp.connect() Device 0 (VID=04e8 and