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


Groups > comp.lang.python > #36019

Re: pygame - importing GL - very bad...

From someone <newsboost@gmail.com>
Newsgroups comp.lang.python
Subject Re: pygame - importing GL - very bad...
Date 2013-01-03 03:02 +0100
Organization A noiseless patient Spider
Message-ID <kc2osd$675$1@dont-email.me> (permalink)
References <kbufkg$ead$1@dont-email.me> <mailman.1512.1357038843.29569.python-list@python.org> <kbvslg$mqg$1@dont-email.me> <50E4AD2E.8090606@gmail.com> <mailman.3.1357165812.2939.python-list@python.org>

Show all headers | View raw


On 01/02/2013 11:30 PM, Andrew Berg wrote:
> On 2013.01.02 15:57, Michael Torrie wrote:

>> *.  The only place where I've seen an import * that actually belonged
>> was in an __init__.py that brought sub-module symbols into the main
>> package namespace, and even then I figure there's got to be a better way.
> This.
>
> I have some code that imports multiprocessing.connection and I do
> actually type out multiprocessing.connection.Client and it doesn't
> bother me one bit. Code is read a lot more than it is written, even if
> only one person ever sees it. The whole "less typing" thing is absurd,
> especially when IDEs have completion features and stdlib modules share

Until about a week ago, actually I hadn't setup emacs to use code 
completion - maybe this will change now because it'll speed things up 
and code completion is just a wonderful thing making things easier + 
quicker to do. I also setup emacs to do use TAGS and a lot more things now.

> similar or exact function names (is it subprocess.Popen or os.popen? I
> guess the author wanted to save 2 seconds typing while anyone who reads
> it has to spend 5-10 to find out which is being used) . I've been using

Well, this is not a problem for opengl-commands, I think... Normally I 
do as you suggest and for the exact same reasons as you write.

> full namespaces since I started learning Python, and I even do it at the
> interactive interpreter because it's just a habit. IMO, "from foo import
> *" should only ever be used for /intentional/ namespace pollution (and
> even then, there are probably better ways to do it).

But I don't do any pollution - only this "format", which was a false 
alert. And so far I'm so consequent to only use it for the 
opengl-commands. I would deem that this is what most opengl-programmers do.

Try to search for opengl-code out there on the internet... Most people 
do as I write I do here, IMHO. But you have a point and generally I 
totally agree with you. This is just a particular exception (and the 
only one I have) where I disagree, because I do as I think the majority 
of opengl-programmers do - based on what I see posted on the internet.





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


Thread

pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-01 12:00 +0100
  Re: pygame - importing GL - very bad... Chris Angelico <rosuav@gmail.com> - 2013-01-01 22:13 +1100
    Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-02 00:49 +0100
      Re: pygame - importing GL - very bad... Michael Torrie <torriem@gmail.com> - 2013-01-02 14:57 -0700
        Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-03 02:53 +0100
          Re: pygame - importing GL - very bad... "Mike C. Fletcher" <mcfletch@vrplumber.com> - 2013-01-03 09:09 -0500
            Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-05 02:10 +0100
              Re: pygame - importing GL - very bad... Dave Angel <d@davea.name> - 2013-01-04 20:30 -0500
                Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-05 11:49 +0100
                Re: pygame - importing GL - very bad... Dave Angel <d@davea.name> - 2013-01-05 06:23 -0500
                Re: pygame - importing GL - very bad... Chris Angelico <rosuav@gmail.com> - 2013-01-05 22:47 +1100
                Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-05 14:06 +0100
                Re: pygame - importing GL - very bad... Chris Angelico <rosuav@gmail.com> - 2013-01-06 00:27 +1100
                Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-05 20:49 +0100
                Re: pygame - importing GL - very bad... alex23 <wuwei23@gmail.com> - 2013-01-06 03:37 -0800
                Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-06 13:46 +0100
      Re: pygame - importing GL - very bad... Andrew Berg <bahamutzero8825@gmail.com> - 2013-01-02 16:30 -0600
        Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-03 03:02 +0100
  Re: pygame - importing GL - very bad... Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-01-01 11:49 +0000
    Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-02 00:49 +0100
      Re: pygame - importing GL - very bad... Nobody <nobody@nowhere.com> - 2013-01-02 03:01 +0000
        Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-02 04:43 +0100
        Re: pygame - importing GL - very bad... alex23 <wuwei23@gmail.com> - 2013-01-02 01:52 -0800
          Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-02 15:04 +0100
      Re: pygame - importing GL - very bad... Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-01-02 07:39 +0000
        Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-02 15:06 +0100
  Re: pygame - importing GL - very bad... Peter Otten <__peter__@web.de> - 2013-01-01 13:56 +0100
    Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-02 00:50 +0100
      pylint, was Re: pygame - importing GL - very bad... Peter Otten <__peter__@web.de> - 2013-01-02 13:07 +0100
        Re: pylint, was Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-02 15:09 +0100
          Re: pylint, was Re: pygame - importing GL - very bad... Dave Angel <d@davea.name> - 2013-01-02 09:26 -0500
            Re: pylint, was Re: pygame - importing GL - very bad... Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-01-02 23:52 +0000
              Re: pylint, was Re: pygame - importing GL - very bad... Ian Kelly <ian.g.kelly@gmail.com> - 2013-01-02 17:25 -0700
              Re: pylint, was Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-03 03:24 +0100
                Re: pylint, was Re: pygame - importing GL - very bad... Terry Reedy <tjreedy@udel.edu> - 2013-01-02 21:48 -0500
                Re: pylint, was Re: pygame - importing GL - very bad... Ian Kelly <ian.g.kelly@gmail.com> - 2013-01-02 19:55 -0700
                Re: pylint, was Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-03 12:19 +0100
                Re: pylint, was Re: pygame - importing GL - very bad... Chris Angelico <rosuav@gmail.com> - 2013-01-03 22:27 +1100
                Re: pylint, was Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-05 02:11 +0100
                Re: pylint, was Re: pygame - importing GL - very bad... Jan Riechers <janpeterr@freenet.de> - 2013-01-05 14:49 +0200
                Re: pylint, was Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-05 14:09 +0100
                Re: pylint, was Re: pygame - importing GL - very bad... Ben Finney <ben+python@benfinney.id.au> - 2013-01-03 17:01 +1100
                Re: pylint, was Re: pygame - importing GL - very bad... Chris Rebert <clp2@rebertia.com> - 2013-01-02 22:33 -0800
                Re: pylint, was Re: pygame - importing GL - very bad... Peter Otten <__peter__@web.de> - 2013-01-03 10:00 +0100
                Re: pylint, was Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-03 12:21 +0100
                Regular expression syntax, was Re: pylint, was Re: pygame - importing GL - very bad... Peter Otten <__peter__@web.de> - 2013-01-03 12:39 +0100
                Re: Regular expression syntax, was Re: pylint, was Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-05 02:12 +0100
                Re: pylint, was Re: pygame - importing GL - very bad... "Mike C. Fletcher" <mcfletch@vrplumber.com> - 2013-01-03 09:19 -0500
                Re: pylint, was Re: pygame - importing GL - very bad... Terry Reedy <tjreedy@udel.edu> - 2013-01-03 11:52 -0500
                Re: pylint, was Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-05 02:14 +0100
            Re: pylint, was Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-03 03:06 +0100
      Re: pylint, was Re: pygame - importing GL - very bad... Chris Angelico <rosuav@gmail.com> - 2013-01-03 01:32 +1100
      Re: pylint, was Re: pygame - importing GL - very bad... Ian Kelly <ian.g.kelly@gmail.com> - 2013-01-02 10:52 -0700
      Re: pylint, was Re: pygame - importing GL - very bad... Chris Angelico <rosuav@gmail.com> - 2013-01-03 04:57 +1100
      Re: pylint, was Re: pygame - importing GL - very bad... Ian Kelly <ian.g.kelly@gmail.com> - 2013-01-02 12:31 -0700
        Re: pylint, was Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-03 03:31 +0100
          Re: pylint, was Re: pygame - importing GL - very bad... Dave Angel <d@davea.name> - 2013-01-02 21:56 -0500
            Re: pylint, was Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-05 02:23 +0100
  Re: pygame - importing GL - very bad... alex23 <wuwei23@gmail.com> - 2013-01-01 14:39 -0800
    Re: pygame - importing GL - very bad... someone <newsboost@gmail.com> - 2013-01-02 00:56 +0100

csiph-web