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


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

Re: monkey patching __code__

Started byIan Kelly <ian.g.kelly@gmail.com>
First post2016-03-18 08:23 -0600
Last post2016-03-18 08:23 -0600
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__ Ian Kelly <ian.g.kelly@gmail.com> - 2016-03-18 08:23 -0600

#105217 — Re: monkey patching __code__

FromIan Kelly <ian.g.kelly@gmail.com>
Date2016-03-18 08:23 -0600
SubjectRe: monkey patching __code__
Message-ID<mailman.321.1458311029.12893.python-list@python.org>
On Fri, Mar 18, 2016 at 7:47 AM, Ian Kelly <ian.g.kelly@gmail.com> wrote:
> Your patched version takes two extra arguments. Did you add the
> defaults for those to the function's __defaults__ attribute?

And as an afterthought, you'll likely need to replace the function's
__globals__ with your own as well.

[toc] | [standalone]


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


csiph-web