Why don't you use import and __import__() ? - They seem designed for such an
application.
I mean, I am not against vicious hacks for the fun of them, but not if they
serve the illusion that what they do can't (easily) be achieved other ways.
Cheers, BB
Peter Waller wrote:
Dear Pythoners,
I
On Sep 13, 1:35 pm, Peter Waller <[EMAIL PROTECTED]> wrote:
> This makes me want to ask: is it difficult to modify a function's
> code?
No, it is not difficult. Look at the byteplay module:
it makes possible all kinds of dirty hacks.
--
http://mail.python.org/mailman/listinfo/python-list
On Sep 12, 2:30 pm, Carsten Haese <[EMAIL PROTECTED]> wrote:
>
> The answer to why this doesn't work lies in the disassembly of that
> function:
This makes me want to ask: is it difficult to modify a function's
code? Even if it weren't possible whilst the function was executing
(because then I wou
Peter Waller wrote:
> Dear Pythoners,
>
> I know this will probably be perceived as 'evil voodoo', and fair
> enough: it probably is. I guess it is unpythonic.
>
> .. but I want to know how to do it anyway - mostly for my own
> interest.
Well, if you're really just asking out of curiosity, it sh
Dear Pythoners,
I know this will probably be perceived as 'evil voodoo', and fair
enough: it probably is. I guess it is unpythonic.
.. but I want to know how to do it anyway - mostly for my own
interest.
Consider the following snippet of code:
---
def Get( *names ):
if not names: return Non