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


Groups > comp.lang.python > #36157

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

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!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.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'python.': 0.02; 'value,': 0.03; 'say,': 0.05; 'function,': 0.07; 'variable,': 0.07; 'python': 0.09; 'c/c++': 0.09; 'object)': 0.09; 'objects.': 0.09; 'useful,': 0.13; 'language': 0.14; 'value.': 0.15; 'adept': 0.16; 'attributes,': 0.16; 'c/c++.': 0.16; 'debugged': 0.16; 'executable.': 0.16; 'googled': 0.16; 'investigate': 0.16; 'program...': 0.16; 'reference).': 0.16; 'later': 0.16; 'wrote:': 0.17; 'passes': 0.17; '(in': 0.18; 'windows': 0.19; 'bit': 0.21; 'object.': 0.22; 'pascal': 0.22; 'references': 0.23; "i've": 0.23; 'pass': 0.25; 'tried': 0.25; 'header:In-Reply-To:1': 0.25; 'header :User-Agent:1': 0.26; '(which': 0.26; 'values': 0.26; 'ago': 0.27; 'am,': 0.27; 'possibly': 0.27; 'c++': 0.27; 'first.': 0.27; 'argue': 0.29; 'objects': 0.29; 'maybe': 0.29; 'that.': 0.30; 'standards': 0.30; 'function': 0.30; 'error': 0.30; 'distribute': 0.30; 'problem.': 0.32; 'could': 0.32; 'conventions': 0.33; 'function.': 0.33; 'problem': 0.33; 'to:addr:python-list': 0.33; 'weeks': 0.33; 'adds': 0.35; 'faster': 0.35; 'doing': 0.35; 'something': 0.35; 'there': 0.35; 'but': 0.36; 'wanted': 0.36; "i'll": 0.36; 'should': 0.36; 'too': 0.36; 'problems': 0.36; 'ok,': 0.37; 'does': 0.37; 'two': 0.37; 'passed': 0.37; 'usual': 0.37; 'well.': 0.37; 'subject:: ': 0.38; 'object': 0.38; 'some': 0.38; 'things': 0.38; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'google': 0.39; 'received:192.168': 0.40; 'think': 0.40; 'skip:u 10': 0.60; 'most': 0.61; 'telling': 0.61; 'subject:...': 0.63; 'more': 0.63; 'great': 0.64; 'sit': 0.65; 'forward': 0.66; 'finally': 0.66; 'header:Reply-To:1': 0.68; 'fact,': 0.69; 'received:74.208': 0.71; 'reply-to:no real name:2**0': 0.72; '(value': 0.84; 'subject:very': 0.91; 'angel': 0.93
Date Sat, 05 Jan 2013 06:23:22 -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> <mailman.104.1357349785.2939.python-list@python.org> <kc90g4$p5d$1@dont-email.me>
In-Reply-To <kc90g4$p5d$1@dont-email.me>
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding 7bit
X-Provags-ID V02:K0:h10kfFjQgUmI3MfQkDqRSeZZM9rJsDl1bisu6BreRaH ZpNeQAhELheXof76ihCFZ0+wDUTpwu2XY5P4+qc/rEOfaJzxHD FrJjVzP29uSmjTIlpCNCuY7UmcKdPSjRBFvDo2lQjrlnR/jhr2 cgCAkrSjTImwqpD/bBYQPCICm17A0LX+2cYncuz0kvS4MmTElG 3lvr5NZogvwxAK3pi4tG/cWpwH0PD3F4FRUYQsCFqkBxNVy9KK +8E6pEEO7vNrBUW0xHuWbWhkxHFL7rwjsgGyxzdjaq3W1+B1O+ wnIeBWTLOvV8Qjgo0ExwMXvIHbIQG3p6kpDQNCjvWFUTLTGfw= =
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.110.1357385021.2939.python-list@python.org> (permalink)
Lines 49
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1357385021 news.xs4all.nl 6909 [2001:888:2000:d::a6]:38208
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:36157

Show key headers only | View raw


On 01/05/2013 05:49 AM, someone wrote:
> On 01/05/2013 02:30 AM, Dave Angel wrote:
>
<snip>
>>
>> Function objects are enormously useful, as you get more adept at using
>> Python.
>
> Ok, I'll look forward to that. Recently I had some problems with
> pass-by-value vs pass-by-reference. I googled the problem and found
> that by default python passes by reference.

Pascal has two calling conventions (value and reference).  C always
calls by value.  C++ adds a call by reference, and maybe later C
standards have added it as well.

Python always calls by object.  In fact, one could argue that there are
no values (in the C sense) in Python.  All names, and all attributes,
and all slots in collections, are references to objects.  So when you
call a function, what you're doing is telling the function how to
reference the same object(s).  The usual way to say that is that the
function call binds a new name to an existing object.

If that object is mutable, then perhaps you wanted to do a copy first. 
Or perhaps you didn't.  As you say, you debugged the program to find out.

> I then debugged my program and finally found out that I should make a
> copy (a new object) of the variable, before I passed it to my
> function. And THIS solved my problem. But in C/C++ I think the default
> is to pass by value, so this error in my program was a bit
> unexpected... Anyway, I feel python is a great language for doing
> things much faster than I could possibly do in C/C++.
>
> I also have on my todo-list to take my opengl-program and make it into
> an executable. I mainly sit on a linux-pc but I want to distribute my
> opengl program for windows (which has most users). I've found
> something on google for py2app, cx_Freeze, bbfreeze and Freeze and I
> hope this cross-platform thing does not cause too many problems... I
> tried one of these tools a few weeks ago but I think I only succeeded
> with a very simple hello-world program... Anyway, that's a problem
> I'll investigate in a few months when I think/hope my opengl program
> is finished...
>


-- 

DaveA

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