Joel Davis wrote:
>
>Emile, essentially, the situation is that I'm trying to create an API
>for consumption scripting. As it stands now, in initial development
>they can pass callback function. The idea was to enable them to pass
>variables and have the handling function determine the type and jus
Joel Davis wrote:
On Dec 29, 11:21 am, Emile van Sebille wrote:
In an extremely controlled situation you may avoid headaches when
deploying this kind of technique. Regardless, we all want to make you
aware that this _will_ likely cause headaches, and, idle curiosity
aside, none of us can
Joel Davis wrote:
I'm just curious if anyone knows of a way to get the variable name of
a reference passed to the function.
Put another way, in the example:
def MyFunc ( varPassed ):
print varPassed;
MyFunc(nwVar)
how would I get the string "nwVar" from inside of "MyFunc"? is it
poss
Joel Davis wrote:
On Dec 29, 11:21 am, Emile van Sebille wrote:
On 12/29/2009 7:02 AM Joel Davis said...
On Dec 29, 2:29 am, "Gabriel Genellina"
wrote:
I'm sure other limitations apply too -- don't rely on this technique for
anything critical.
--
Gabriel Genellina
Gabriel,
thanks for your i
On Dec 29, 11:21 am, Emile van Sebille wrote:
> On 12/29/2009 7:02 AM Joel Davis said...
>
> > On Dec 29, 2:29 am, "Gabriel Genellina"
> > wrote:
> >> I'm sure other limitations apply too -- don't rely on this technique for
> >> anything critical.
>
> >> --
> >> Gabriel Genellina
>
> > Gabriel,
>
On Tue, Dec 29, 2009 at 8:17 AM, Joel Davis wrote:
> did set the tone and I think I've been more than a little tolerant on
> this. Someone posts a question, responds back with a "n/m I found the
> solution, here it is" and his response is essentially to berate them,
> telling them how crappy their
Joel Davis wrote:
> On Dec 29, 10:08 am, Steve Holden wrote:
>> Joel Davis wrote:
>>> On Dec 29, 2:04 am, Steven D'Aprano
>>> wrote:
On Mon, 28 Dec 2009 19:28:32 -0800, Joel Davis wrote:
> my thanks go out to Emile and Mr Hanson for their responses, I think
> I've found the solution,
On 12/29/2009 7:02 AM Joel Davis said...
On Dec 29, 2:29 am, "Gabriel Genellina"
wrote:
I'm sure other limitations apply too -- don't rely on this technique for
anything critical.
--
Gabriel Genellina
Gabriel,
thanks for your input, I had no idea that did that and it could have
been deployed
On Dec 29, 10:08 am, Steve Holden wrote:
> Joel Davis wrote:
> > On Dec 29, 2:04 am, Steven D'Aprano
> > wrote:
> >> On Mon, 28 Dec 2009 19:28:32 -0800, Joel Davis wrote:
> >>> my thanks go out to Emile and Mr Hanson for their responses, I think
> >>> I've found the solution, much shorter as well
Joel Davis wrote:
> On Dec 29, 2:04 am, Steven D'Aprano
> wrote:
>> On Mon, 28 Dec 2009 19:28:32 -0800, Joel Davis wrote:
>>> my thanks go out to Emile and Mr Hanson for their responses, I think
>>> I've found the solution, much shorter as well:
>>> > #!/usr/bin/python
>>> > import traceba
On 29 Dic, 00:54, Joel Davis wrote:
> I'm just curious if anyone knows of a way to get the variable name of
> a reference passed to the function.
>
> Put another way, in the example:
>
> def MyFunc ( varPassed ):
> print varPassed;
>
> MyFunc(nwVar)
>
> how would I get the string "nwVar"
On Dec 29, 2:29 am, "Gabriel Genellina"
wrote:
> En Tue, 29 Dec 2009 00:28:32 -0300, Joel Davis
> escribió:
>
>
>
> > On Dec 28, 9:37 pm, Joel Davis wrote:
> > my thanks go out to Emile and Mr Hanson for their responses, I think
> > I've found the solution, much shorter as well:
>
> > > #!
On Dec 29, 2:04 am, Steven D'Aprano
wrote:
> On Mon, 28 Dec 2009 19:28:32 -0800, Joel Davis wrote:
> > my thanks go out to Emile and Mr Hanson for their responses, I think
> > I've found the solution, much shorter as well:
>
> > > #!/usr/bin/python
>
> > > import traceback
>
> > > def
En Tue, 29 Dec 2009 00:28:32 -0300, Joel Davis
escribió:
On Dec 28, 9:37 pm, Joel Davis wrote:
my thanks go out to Emile and Mr Hanson for their responses, I think
I've found the solution, much shorter as well:
> #!/usr/bin/python
> import traceback
> def testing ( varPassed
On Mon, 28 Dec 2009 19:28:32 -0800, Joel Davis wrote:
> my thanks go out to Emile and Mr Hanson for their responses, I think
> I've found the solution, much shorter as well:
>
> > #!/usr/bin/python
>
> > import traceback
>
> > def testing ( varPassed ):
> > print traceba
On Dec 28, 9:37 pm, Joel Davis wrote:
> As far as more positive things are concerned, is anyone aware of what
> the support for _getframe(1) the way I used it is? Does steven have a
> newer (or older) version than me, maybe? (2.6.2) it seems like the
> sort of thing that ought to have pretty unifo
As far as more positive things are concerned, is anyone aware of what
the support for _getframe(1) the way I used it is? Does steven have a
newer (or older) version than me, maybe? (2.6.2) it seems like the
sort of thing that ought to have pretty uniform behavior, but are
their certain calls it var
On Dec 28, 8:40 pm, Steven D'Aprano
wrote:
> On Mon, 28 Dec 2009 17:27:21 -0800, Joel Davis wrote:
> > For posterity, I figured out a solution:
>
> > > #!/usr/bin/python
>
> > > import sys
> > > from traceback import extract_stack
>
> > > varPassed="varName get"
>
> > > def MyFunc(varPassed):
On Mon, 28 Dec 2009 17:27:21 -0800, Joel Davis wrote:
> For posterity, I figured out a solution:
>
> > #!/usr/bin/python
>
> > import sys
> > from traceback import extract_stack
>
> > varPassed="varName get"
>
> > def MyFunc(varPassed):
> > try:
> > raise None
>
On Mon, 28 Dec 2009 15:54:04 -0800, Joel Davis wrote:
> I'm just curious if anyone knows of a way to get the variable name of a
> reference passed to the function.
>
> Put another way, in the example:
>
> def MyFunc ( varPassed ):
> print varPassed;
>
> MyFunc(nwVar)
>
> how would I g
For posterity, I figured out a solution:
> #!/usr/bin/python
> import sys
> from traceback import extract_stack
> varPassed="varName get"
> def MyFunc(varPassed):
> try:
> raise None
> except:
> frame = sys._getframe(1)
>
On 12/28/2009 3:54 PM Joel Davis said...
I'm just curious if anyone knows of a way to get the variable name of
a reference passed to the function.
For curiosity, sure -- but it's real weak...
Put another way, in the example:
def MyFunc ( varPassed ):
print varPassed;
MyFunc(nwVa
On Mon, Dec 28, 2009 at 3:54 PM, Joel Davis wrote:
> I'm just curious if anyone knows of a way to get the variable name of
> a reference passed to the function.
>
> Put another way, in the example:
>
> def MyFunc ( varPassed ):
> print varPassed;
>
> MyFunc(nwVar)
>
> how would I get the str
I'm just curious if anyone knows of a way to get the variable name of
a reference passed to the function.
Put another way, in the example:
def MyFunc ( varPassed ):
print varPassed;
MyFunc(nwVar)
how would I get the string "nwVar" from inside of "MyFunc"? is it
possible?
--
http://mai
24 matches
Mail list logo