Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #33858

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

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.004
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'override': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'terry': 0.09; 'gui': 0.11; 'library': 0.15; 'agree.': 0.16; 'personally,': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'subject:type': 0.16; 'wrote:': 0.17; 'jan': 0.18; 'code.': 0.20; 'variable': 0.20; 'url:com)': 0.22; 'defined': 0.22; 'errors': 0.23; 'non': 0.24; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'am,': 0.27; 'language.': 0.27; 'header:X-Complaints-To:1': 0.28; "i'm": 0.29; "skip:' 10": 0.30; 'fri,': 0.30; 'function': 0.30; 'automation': 0.33; 'to:addr :python-list': 0.33; 'hi,': 0.33; 'list': 0.35; 'built-in': 0.35; 'nov': 0.35; 'especially': 0.35; 'received:org': 0.36; 'michael': 0.36; 'bad': 0.37; 'why': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'called': 0.39; 'list,': 0.39; 'subject:-': 0.40; 'header:Received:5': 0.40; 'think': 0.40; 'obvious': 0.71; 'fitting': 0.84; 'horrible': 0.84; 'received:fios.verizon.net': 0.84; 'joel': 0.91
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Terry Reedy <tjreedy@udel.edu>
Subject Re: Is it bad style to override the built-in function `type`?
Date Fri, 23 Nov 2012 13:35:54 -0500
References <d2e59ddf-d44c-44d9-91c5-539b03cfcfcb@googlegroups.com> <CAPM-O+znTEt0eTz=xvaGi6MOLhJaGM_uV-c904c+fFTL6ejD3A@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host pool-173-75-251-66.phlapa.fios.verizon.net
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121026 Thunderbird/16.0.2
In-Reply-To <CAPM-O+znTEt0eTz=xvaGi6MOLhJaGM_uV-c904c+fFTL6ejD3A@mail.gmail.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.237.1353695779.29569.python-list@python.org> (permalink)
Lines 25
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1353695779 news.xs4all.nl 6893 [2001:888:2000:d::a6]:35428
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:33858

Show key headers only | View raw


On 11/23/2012 11:22 AM, Joel Goldstick wrote:
>
>
>
> On Fri, Nov 23, 2012 at 11:12 AM, Michael Herrmann
> <michael.herrmann@getautoma.com <mailto:michael.herrmann@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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Is it bad style to override the built-in function `type`? Michael Herrmann <michael.herrmann@getautoma.com> - 2012-11-23 08:12 -0800
  Re: Is it bad style to override the built-in function `type`? Emile van Sebille <emile@fenx.com> - 2012-11-23 08:39 -0800
  Re: Is it bad style to override the built-in function `type`? Roy Smith <roy@panix.com> - 2012-11-23 11:47 -0500
  Re: Is it bad style to override the built-in function `type`? Michael Herrmann <michael.herrmann@getautoma.com> - 2012-11-23 09:08 -0800
  Re: Is it bad style to override the built-in function `type`? Terry Reedy <tjreedy@udel.edu> - 2012-11-23 13:35 -0500
    Re: Is it bad style to override the built-in function `type`? Michael Herrmann <michael.herrmann@getautoma.com> - 2012-11-23 10:41 -0800
      Re: Is it bad style to override the built-in function `type`? Cameron Simpson <cs@zip.com.au> - 2012-11-24 09:30 +1100
        Re: Is it bad style to override the built-in function `type`? Michael Herrmann <michael.herrmann@getautoma.com> - 2012-11-24 14:32 -0800
          Re: Is it bad style to override the built-in function `type`? Cameron Simpson <cs@zip.com.au> - 2012-11-25 09:47 +1100
          Re: Is it bad style to override the built-in function `type`? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-11-25 04:06 +0000
            Re: Is it bad style to override the built-in function `type`? Cameron Simpson <cs@zip.com.au> - 2012-11-25 17:33 +1100
        Re: Is it bad style to override the built-in function `type`? Michael Herrmann <michael.herrmann@getautoma.com> - 2012-11-24 14:32 -0800
    Re: Is it bad style to override the built-in function `type`? Michael Herrmann <michael.herrmann@getautoma.com> - 2012-11-23 10:41 -0800
  Re: Is it bad style to override the built-in function `type`? Ramchandra Apte <maniandram01@gmail.com> - 2012-11-24 23:02 -0800
  Re: Is it bad style to override the built-in function `type`? Michael Herrmann <michael.herrmann@getautoma.com> - 2012-11-29 03:46 -0800
  Re: Is it bad style to override the built-in function `type`? rusi <rustompmody@gmail.com> - 2012-11-30 09:54 -0800
    Re: Is it bad style to override the built-in function `type`? Michael Herrmann <michael.herrmann@getautoma.com> - 2012-12-03 02:57 -0800

csiph-web