Is it bad style to override the built-in function `type`?
joel.goldstick at gmail.com
Fri Nov 23 17:22:21 CET 2012
On Fri, Nov 23, 2012 at 11:12 AM, 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.
> 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 (http://bit.ly/10aOy4H), 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!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list