withhacks module (Re: Code redundancy)

Ryan Kelly ryan at rfk.id.au
Wed Apr 21 19:55:09 EDT 2010


On Wed, 2010-04-21 at 19:43 -0400, python at bdurham.com wrote:
> Ryan,
> 
> Your withhacks module looks very interesting.
> http://pypi.python.org/pypi/withhacks
> 
> What are your specific concerns about its use? Are there portability
> concerns?


It combines two things you just don't see in respectable python programs
- bytecode hacking and trace-function hacking.  And I'm sure its
performance is less than stellar, although much of that could be fixed
with some careful bytecode caching.

I'd be surprised if it runs under alternative python implementations,
and not surprised if it doesn't even work on Python 3 - although I
haven't tried it to confirm either way.

Having said that, it should work as advertised on Python 2.X  with
minimal fuss. So if you don't care about portability or about that dirty
feeling you get from messing with the Python internals, then have at
it :-)


  Cheers,

     Ryan



-- 
Ryan Kelly
http://www.rfk.id.au  |  This message is digitally signed. Please visit
ryan at rfk.id.au        |  http://www.rfk.id.au/ramblings/gpg/ for details





More information about the Python-list mailing list