Is it bad style to override the built-in function `type`?
Terry Reedy
tjreedy at udel.edu
Fri Nov 23 13:35:54 EST 2012
On 11/23/2012 11:22 AM, Joel Goldstick wrote:
>
>
>
> On Fri, Nov 23, 2012 at 11:12 AM, Michael Herrmann
> <michael.herrmann at getautoma.com <mailto:michael.herrmann at getautoma.com>>
> wrote:
>
> Hi,
>
> 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.
>
> Personally, I think this is a horrible idea. On this list and the tutor
> list, people often use variable names that are already defined in the
> language. It leads to non obvious errors -- especially when revisting
> old code. Why not call the thing 'key_stroke'?
I agree.
--
Terry Jan Reedy
More information about the Python-list
mailing list