Giter Site home page Giter Site logo

Comments (3)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 11, 2024
adam, thanks for your patch.
Unfortunately, there is a problem with the patch as it is.
inspect.getsource() only works for a function which is defined in a source file 
on
disk and just because isinstance(fun, FunctionType) is true doesn't mean 
getsource()
won't throw an exception.

However, I can't imagine a situation where practically speaking one would pass a
function object that wasn't from a source file. If you had the raw code to 
begin with
you could just pass it along without compiling it to a function object.

I'm accepting this and assigning it to myself. I'll play around with it.

In the meantime, a workaround if you want to run views which are defined in .py 
files
is to install your .py files into your python library for the environment the 
view
server runs in and pass the string "from module import map_fun" for the map 
function.

Original comment by [email protected] on 28 Feb 2009 at 4:48

  • Changed state: Accepted
  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

from couchdb-python.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 11, 2024
Randall, I have this patch integrated in my working copy already, and have even 
added some decorator fu. I'll 
check in after some more testing.

Original comment by cmlenz on 28 Feb 2009 at 12:18

from couchdb-python.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 11, 2024
Patch plus decorator support checked in in r136.

Original comment by cmlenz on 9 Mar 2009 at 9:39

  • Changed state: Fixed

from couchdb-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.