Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #36148
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!feed.xsnews.nl!border-1.ams.xsnews.nl!xlned.com!feeder7.xlned.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <d@davea.name> |
| 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; 'python.': 0.02; 'python,': 0.02; 'compiler': 0.05; 'reason,': 0.07; 'rewrite': 0.07; 'trailing': 0.07; 'api': 0.09; 'python': 0.09; 'imports': 0.09; 'migration': 0.09; 'useful,': 0.13; 'value.': 0.15; 'adept': 0.16; 'backward': 0.16; 'colons': 0.16; 'lookups': 0.16; 'parentheses': 0.16; 'statements,': 0.16; 'typo': 0.16; 'wxpython': 0.16; 'wrote:': 0.17; 'instance': 0.17; 'version.': 0.17; 'previously': 0.18; 'mostly': 0.20; 'bit': 0.21; 'import': 0.21; 'meant': 0.21; 'names.': 0.22; 'this:': 0.23; 'allows': 0.25; 'least': 0.25; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; '(which': 0.26; 'wrote': 0.26; 'fit': 0.26; 'mike': 0.27; 'older': 0.27; 'c++': 0.27; 'forgot': 0.27; 'object,': 0.27; 'interface': 0.27; "doesn't": 0.28; 'attempting': 0.29; 'cases.': 0.29; 'pointer.': 0.29; 'statements': 0.29; 'no,': 0.29; 'objects': 0.29; 'class': 0.29; "i'm": 0.29; 'maybe': 0.29; 'function': 0.30; 'error': 0.30; 'code': 0.31; 'gets': 0.32; 'could': 0.32; 'to:addr :python-list': 0.33; 'likely': 0.33; 'or,': 0.34; 'needed': 0.35; 'friends,': 0.35; 'doing': 0.35; 'pm,': 0.35; 'sometimes': 0.35; 'too.': 0.35; 'something': 0.35; 'there': 0.35; 'add': 0.36; 'really': 0.36; 'tool': 0.36; 'but': 0.36; "didn't": 0.36; "i'll": 0.36; 'ok,': 0.37; 'subject:: ': 0.38; 'object': 0.38; 'some': 0.38; 'things': 0.38; 'nothing': 0.38; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'little': 0.39; 'where': 0.40; 'received:192.168': 0.40; 'think': 0.40; 'your': 0.60; 'easy': 0.60; 'most': 0.61; 'remove': 0.61; 'real': 0.61; 'between': 0.63; 'subject:...': 0.63; 'more': 0.63; 'making': 0.64; 'here': 0.65; 'legal': 0.65; 'learned': 0.65; 'header:Reply-To:1': 0.68; 'received:74.208': 0.71; 'reply-to:no real name:2**0': 0.72; 'calls,': 0.84; 'compliance,': 0.84; 'confusing': 0.84; 'me).': 0.84; 'received:74.208.4.194': 0.84; 'semi': 0.84; 'closer.': 0.91; 'subject:very': 0.91 |
| Date | Fri, 04 Jan 2013 20:30:47 -0500 |
| From | Dave Angel <d@davea.name> |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121011 Thunderbird/16.0.1 |
| MIME-Version | 1.0 |
| To | python-list@python.org |
| Subject | Re: pygame - importing GL - very bad... |
| References | <kbufkg$ead$1@dont-email.me> <mailman.1512.1357038843.29569.python-list@python.org> <kbvslg$mqg$1@dont-email.me> <mailman.1.1357163829.2939.python-list@python.org> <kc2oa0$3e3$1@dont-email.me> <mailman.38.1357222158.2939.python-list@python.org> <kc7uia$8h1$1@dont-email.me> |
| In-Reply-To | <kc7uia$8h1$1@dont-email.me> |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | 7bit |
| X-Provags-ID | V02:K0:V120boB75ZRoZdatVByOccM6NvsLGBdxeFwDpygYae2 Ao9hFOblhjNaY4sllBrptk5Pbzu2Q8yzNIjZaXN5Ad9rM6gYsa SdfkwazKA3sLI/sksp8hUFY+apLFPn1sngdsYMynmAFpXmJowe arK9ladvICpdWo9QyHe16jyuUcDXqAewLhGk5ojKafAnBDtjUz Vluz+YI8HmfXpbcgaX2XWYsDg+2viNnteXx0cfiWY44jLNHpuF oVW4YntkN9R4hlgUWh+SUMYQKdNyIs74Ou0ZevkUdT3nFQieQm vqDpchKsCBbSRjkT19X0JxQ9g527M00jmQXQuqWWc+OA40MyQ= = |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| Reply-To | d@davea.name |
| 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.104.1357349785.2939.python-list@python.org> (permalink) |
| Lines | 74 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1357349785 news.xs4all.nl 6879 [2001:888:2000:d::a6]:40610 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:36148 |
Show key headers only | View raw
On 01/04/2013 08:10 PM, someone wrote: > On 01/03/2013 03:09 PM, Mike C. Fletcher wrote: >> <snip> > >> PyOpenGL's current approach is mostly attempting to maintain backward >> compatibility with the older revisions. wxPython actually rewrote its >> whole interface to go from * imports into namespaced lookups and then >> wrote a little migration tool that would attempt to rewrite your code >> for the new version. They also provided a transitional API so that code >> could mix-and-match the styles. For PyOpenGL that would look something >> like this: >> >> from OpenGL import gl, glu, glut >> >> gl.Rotate(...) >> gl.Clear(gl.COLOR_BUFFER_BIT) > > Ok, that's interesting. However, I like it the way it is, where I can > copy/paste C-code from the web and change some small things and it'll > work and fit into my needs. BUT I didn't know there was such a > transitional API - interesting. I however don't want to be a > first-mover - let's see if sufficiently many people will use this and > then I'll consider doing it too. At the moment, I still think the > star-import is good because it makes it easy to look for C-code and > program it (=do it) like people would do it in C. > >> or, if you really needed PEP-8 compliance, and don't mind making the API >> look nothing like the original, we might even go to: >> >> from opengl import gl, glu, glut >> >> gl.rotate(...) >> gl.clear(gl.COLOR_BUFFER_BIT) > > Erhm, that's the same as above. Is that what you meant to write? > No, it's not the same; here he did not capitalize the function names. Previously they look like class instantiations. > <snip> > > Well, I'm sometimes a bit annoyed that python doesn't give as many > warnings/errors as one gets in C - for instance sometimes I copy/paste > and forget to remove the trailing semi-colons. Trailing semi colons are legal in most cases. The semi-colon is a separator between statements, when one wants to put multiple statements on one line. > However after I began to use pylint and friends, this error will be > caught. Then sometimes I forgot to add () for function calls, which in > C would cause an error by the compiler Actually no. In C, a function name without parentheses is also a function pointer. Not exactly the same as a function object, though C++ gets a lot closer. But the real reason C catches that typo is that the types most likely don't match, depending on what you meant to do with the return value. > but which python allows so one can get the object (which maybe is also > a good reason, but at least in the beginning when I learned python, > this was very annoying + confusing to me). > Function objects are enormously useful, as you get more adept at using Python. -- DaveA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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