码迷,mamicode.com
首页 > Web开发 > 详细

WebSphere的jython编码的一个坑

时间:2018-05-18 15:43:11      阅读:196      评论:0      收藏:0      [点我收藏+]

标签:.net   一个   more   core   存在   size   project   ons   released   

was5.1版本,用"name=" in line这类判断字符串包含的方式时,系统会提示报错

TypeError: string member test needs char left operand

原来python早期代码,in左边必须是单个的字符,而was5.1的jython是用了python的早期版本,所以不支持更高级的语法,was8.5中也存在这问题

  • Yeah, its fairly old I believe. Its the implementation of jython that comes with WebSphere 8.5.5. Even though its the very latest release of WebSphere, it still comes with a ten year old python! – Seer Oct 3 ‘13 at 9:15
  •  
    I looked into this some more. WebSphere comes with Jython 2.1 (just type sys.version to verify). Look at SourceForge and behold, it was released in September 2002, thus why we have to deal with stupid issues from over a decade ago: sourceforge.net/projects/jython/files/jython – ArtOfWarfare Jun 3 ‘14 at 15:05

被这傻逼问题闹的怀疑自己到底会不会写python了……

 

参考页面:https://stackoverflow.com/questions/19140003/python-jython-if-substring-in-string-always-results-in-typeerror-string-member

WebSphere的jython编码的一个坑

标签:.net   一个   more   core   存在   size   project   ons   released   

原文地址:https://www.cnblogs.com/slqt/p/9056149.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!