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

Joel Goldstick joel.goldstick at
Fri Nov 23 17:22:21 CET 2012

On Fri, Nov 23, 2012 at 11:12 AM, Michael Herrmann <
michael.herrmann at> 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 (
> 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'?

> This post is motivated by an already lengthy discussion on this mailing
> list (, where we tried to find alternative names
> for `type`. Many were found, but none are quite as fitting as 'type'.
> For the sake of avoiding a discussion that is already being lead elsewhere
> please confine this thread to what you generally think about overriding
> `type`, and post suggestions for alternative names or solutions in the
> other thread.
> Thank you very much!
> Michael
> --

Joel Goldstick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list