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


Groups > comp.lang.python > #105406 > unrolled thread

Re: monkey patching __code__

Started byMatt Wheeler <m@funkyhat.org>
First post2016-03-21 20:42 +0000
Last post2016-03-21 20:42 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: monkey patching __code__ Matt Wheeler <m@funkyhat.org> - 2016-03-21 20:42 +0000

#105406 — Re: monkey patching __code__

FromMatt Wheeler <m@funkyhat.org>
Date2016-03-21 20:42 +0000
SubjectRe: monkey patching __code__
Message-ID<mailman.463.1458592985.12893.python-list@python.org>
On 20 March 2016 at 16:46, Sven R. Kunze <srkunze@mail.de> wrote:
> On 19.03.2016 00:58, Matt Wheeler wrote:
>>
>> I know you have a working solution now with updating the code &
>> defaults of the function, but what about just injecting your function
>> into the modules that had already imported it after the
>> monkeypatching?
>>
>> Seems perhaps cleaner, unless you'd end up having to do it to lots of
>> modules...
>
> Why do you consider it cleaner?

I think it would be more explicit and understandable for someone
reading your code.

I suppose it's quite subjective :)

-- 
Matt Wheeler
http://funkyh.at

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web