discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Problems with Gnuradio-Companion


From: Marcus D. Leech
Subject: Re: [Discuss-gnuradio] Problems with Gnuradio-Companion
Date: Sat, 22 Nov 2014 12:22:43 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16

On 11/22/2014 12:07 PM, Tom Rondeau wrote:
On Sat, Nov 22, 2014 at 11:08 AM, Mike Willis <address@hidden> wrote:
Thanks to Sebastian for his help.
 
This appears to be a bug? Well maybe my bug. My input parameter was intended as an identification number and not unreasonably I called it “id”. Apparently I can’t call the parameter “id”. I can call it “ix” and grc will find it. What on earth?
 
Mike

$ ipython

In [1]: help(id)

Help on built-in function id in module __builtin__:

id(...)
    id(object) -> integer
    
    Return the identity of an object.  This is guaranteed to be unique among
    simultaneously existing objects.  (Hint: it's the object's memory address.)



GRC runs in Python. It outputs Python code. You tried to use a reserved Python keyword.

Tom


    
It is *theoretically* possible for GRC to identify "stuff" that will later cause you problems at runtime due to Pythonisms.  But that would *vastly*
  increase GRC's complexity, and it would be error-prone, and "false positive" rather a lot, it's simply not practical.  GRC could also have its own
  "language" for evaluating expressions, rather than use Python.  That would come with its own set of surprises and gotchas, so, better to use
  a language that is already well-developed, well-understood, and with well-defined semantics.

There's no real way to get around the fact that, at the end of the day, you're programming, and thus run into all the same "gotchas" that
  "conventional" (is there such a thing any more) programmers run into.




-- 
Marcus Leech
Principal Investigator
Shirleys Bay Radio Astronomy Consortium
http://www.sbrac.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]