Is it bad style to override the built-in function `type`?

Roy Smith roy at panix.com
Fri Nov 23 11:47:34 EST 2012


In article <d2e59ddf-d44c-44d9-91c5-539b03cfcfcb at googlegroups.com>,
 Michael Herrmann <michael.herrmann at getautoma.com> wrote:

> do you think it's bad style to override the built-in function `type`? I'm 
> co-developing a GUI automation library called Automa 
> (http://www.getautoma.com) and 'type' would be a very fitting name for a 
> function that generates artificial key strokes. 

For local variable names with small scopes, I don't fret much about 
overriding built-in names.  For a library, I would try harder to find 
non-conflicting names.  How about one of these:

type_text()
enter_text()
keyboard()

PS, A suggestion about your website.  In these days of tech exit 
strategies and M/A crazyness, putting "Purchase" and "Company" as 
adjacent items in the main menu might be misconstrued.  At first glance, 
I read it as "Purchase company".  Twitter Bootstrap, no?



More information about the Python-list mailing list