惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

腾讯CDC
Schneier on Security
Schneier on Security
B
Blog RSS Feed
aimingoo的专栏
aimingoo的专栏
P
Proofpoint News Feed
A
About on SuperTechFans
Recorded Future
Recorded Future
Recent Announcements
Recent Announcements
Microsoft Security Blog
Microsoft Security Blog
L
LangChain Blog
Hugging Face - Blog
Hugging Face - Blog
The GitHub Blog
The GitHub Blog
Google DeepMind News
Google DeepMind News
T
Tailwind CSS Blog
Vercel News
Vercel News
H
Hackread – Cybersecurity News, Data Breaches, AI and More
MyScale Blog
MyScale Blog
V2EX - 技术
V2EX - 技术
N
Netflix TechBlog - Medium
F
Fortinet All Blogs
V
Visual Studio Blog
Martin Fowler
Martin Fowler
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
博客园 - Franky
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
T
The Exploit Database - CXSecurity.com
F
Full Disclosure
Scott Helme
Scott Helme
H
Heimdal Security Blog
博客园 - 叶小钗
Google DeepMind News
Google DeepMind News
Cyberwarzone
Cyberwarzone
Application and Cybersecurity Blog
Application and Cybersecurity Blog
V
Vulnerabilities – Threatpost
Blog — PlanetScale
Blog — PlanetScale
Security Latest
Security Latest
WordPress大学
WordPress大学
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Troy Hunt's Blog
S
SegmentFault 最新的问题
Forbes - Security
Forbes - Security
Jina AI
Jina AI
S
Securelist
小众软件
小众软件
Simon Willison's Weblog
Simon Willison's Weblog
J
Java Code Geeks
AWS News Blog
AWS News Blog
N
News and Events Feed by Topic
博客园 - 三生石上(FineUI控件)
量子位

博客园 - jjxstudio

关于silverlight 前景的讨论,不吐不快 没有说说新的async ctp吗? 新blog地址 青春咖啡馆 2010 计划 axapta 断开的记录集 django 1.1 south 理解zope3 的适配器 准备放弃django openerp新的web-client openerp view design elements中的col和colspan - jjxstudio a中的this和element 上下文 怎样才算是一个好的windows forms 应用程序框架? 自定义django admin 之一 django admin search_fields 今天的折腾 杭州:一个python的工作机会
ironpython的下一个版本
jjxstudio · 2008-09-14 · via 博客园 - jjxstudio

应该很快了,ironpython将会发布beta 5 ,这个版本应该会带来dlr hosting spec 的稳定版本,你可以从这里下载 dlr hosting spec的pdf 版本 http://compilerlab.members.winisp.net/dlr-spec-hosting.pdf ,而对应的ironpyton的源代码,则可以从 http://www.codeplex.com/ironpython sources 中下载

至于dlr hosting spec 的变化,是引入了ScriptRuntimeSetup,允许从配置文件初始化script runtime, 大家可以参考这个blog

http://blogs.msdn.com/seshadripv/archive/2008/09/07/dlr-hosting-api-latest-version-of-the-spec-is-available-online-includes-changes-to-runtime-initialization.aspx

语言实现上,beta 5比上一个版本多了__future__几个功能的实现,典型的如with, 类似于c#的using,能在当对象离开一个范围时进行清理的工作,默认的,对象要实现__enter__和__exit__方法

 from __future__ import with_statement
class Test:
    def __enter__(self):
        print 'enter'
        return self
    def __exit__(self,type,value,traceback):
        print 'exit'
    def do_some(self):
        print 'do_some'

with Test() as p:
    p.do_some()

其次是generaters 功能,下面是个简单的例子

 from __future__ import generators

def foo():
    print 'hello'
    yield 1
    print 'world'
    yield 2

a=foo()

a.next()

# hello

# 1

a.next()

#world

#2

然后是absolute_import ,允许你使用. 当前目录,..上级目录来导入一个模块

至于其他细节,有待慢慢发现 , 哦,忘了说明重要的一点,那就是System.Scripting命名空间又回到Microsoft.Scripting 命名空间了,呵呵,真够折腾的

 当自己编译ironpython 2.0时,由于需要用强名,这里IronPython项目对IronPython有 InternalsVisibleTo attribute ,记录步骤备忘

获取public key

sn -p mykey.snk mykey.pub

sn -tp mykey.pub >pub.txt

取public key部分到InternalsVisibleTo attribute,类似

[assembly: InternalsVisibleTo("IronPython.Modules,PublicKey=0024000004800000940000000602000000240000525341310004000001000100ff0644570f613b38d3478c322838e1943051939b0b8fee043cf01b18b12c77ce87249e297c754abd80b43fc79128be55979e7544e96555d5d0ac90565160867be288427367d60781cdd7ec1c4ab6aec2b32eb417af8bdd2275477c8a441b2b489668634d4c1b6989f3690736bb0d25426bfaa317b338dd3961203bcecdfccb98")]