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

Emile van Sebille emile at fenx.com
Fri Nov 23 17:39:10 CET 2012


On 11/23/2012 8:12 AM, Michael Herrmann 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.
>
> 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!
> Michael
>

http://stackoverflow.com/questions/9109333/is-it-bad-practice-to-use-a-built-in-function-name-as-an-attribute-or-method-ide





More information about the Python-list mailing list