Help me pick an API design (OO vs functional)

Michael Herrmann michael.herrmann at getautoma.com
Thu Mar 28 06:54:33 EDT 2013


On Wednesday, March 27, 2013 5:45:49 PM UTC+1, Ethan Furman wrote:
> On 03/27/2013 02:34 AM, Michael Herrmann wrote:
> > Design #2:
> >          notepad_1 = start("Notepad")
> >          notepad_2 = start("Notepad")
> >          switch_to(notepad_1)
> >          write("Hello World!")
> >          press(CTRL + 'a', CTRL + 'c')
> >          switch_to(notepad_2)
> >          press(CTRL + 'v')
> ...
> 
> Go with #2.  Not everything has to be a method.  len(), for example, is not a method, even though it calls one.

That's a good point. I actually think #2 is the one we'll use.



More information about the Python-list mailing list