Your Ad Here
首页 | 编程语言 | 网站建设 | 游戏天堂 | 冲浪宝典 | 网络安全 | 操作系统 | 软件时空 | 硬件指南 | 病毒相关 | IT 认证
软讯网络 > 编程语言 > 其他编程语言 > python中lambda的源代码
【标  题】:python中lambda的源代码
【关键字】:python,lambda
【来  源】:http://www.cublog.cn/u/17118/showart.php?id=97193

python中lambda的源代码

Your Ad Here
觉得lambda的用法有点神,所以贴出来,有待进一步研究!
/*Python-ast.c*/
expr_ty
Lambda(arguments_ty args, expr_ty body, int lineno, int col_offset, PyArena
       *arena)
{
        expr_ty p;
        if (!args) {
                PyErr_SetString(PyExc_ValueError,
                                "field args is required for Lambda");
                return NULL;
        }
        if (!body) {
                PyErr_SetString(PyExc_ValueError,
                                "field body is required for Lambda");
                return NULL;
        }
        p = (expr_ty)PyArena_Malloc(arena, sizeof(*p));
        if (!p) {
                PyErr_NoMemory();
                return NULL;
        }
        p->kind = Lambda_kind;
        p->v.Lambda.args = args;
        p->v.Lambda.body = body;
        p->lineno = lineno;
        p->col_offset = col_offset;
        return p;
}
 
 
python resource:【上一篇】
『龙人PCB抄板』PCB设计,高速PCB设计,PCB线路板抄板:【下一篇】
【相关文章】
  • python resource
  • 用python计算top命令中某个进程的CPU,Memory使用情况
  • 如何理解并正确使用python中的self!
  • S60模拟器上安装python
  • A Better File Upload Progress Bar using Python, AJAX Prototype, & JSON
  • Python模块篇
  • Python参考篇
  • Python几种开发工具介绍
  • 不可错过的MSDN TV —— IronPython: Python on the .NET Framework (下)
  • Python指南-0-前言
  • 【随机文章】
  • HDSI2.2黑客X档案专用版
  • Lomboz插件的安装与配置[Eclipse 3.0,3.1.x与3.2.x版本]第四部分
  • Gmail程序员只有23岁 产品经理出道不满1年
  • ring0 / ring3 跨级别进程通信.
  • 关于待机,休眠的经典问答
  • Linux内核的同步机制之二--自旋锁
  • 控制IIS的ADSI类现在拿出来和大家分享吧
  • Photoshop 7.0 其它滤镜(2)
  • iCamUSB宽带网络智能摄像器
  • 不可忽视URL漏洞
  • 【相关评论】
    没有相关评论
    【发表评论】
    姓名:
    邮件:
    随机码*
    评论*
          
    |  首 页  |  版权声明  |  联系我们   |  网站地图  |
    CopyRight © 2004-2007 软讯网络 All Rigths Reserved.